Unity Component System in Java

Unity Component System in Java



I am looking to create a component-based game engine, and I was wondering how components would be stored on a GameObject.


GameObject



Component will be a type that all scripts derive from.



Possibly an ArrayList that holds references to each component?


ArrayList



I know it's going to be infinitely worse than UnityEngine.





Without a design of your game engine components can be stored any way possible. If you want to learn I would say try and find out, look at different engines when you get stuck.
– Maarten Bodewes
Aug 23 at 20:00





Any ideas as to how? I just want the public's opinion on the best ways to store components on an object.
– EpicNicks
Aug 26 at 1:35





1 Answer
1



For an more inside view how Unity works it is usefull to set the project settings to force text files (Edit -> Project Settings -> Editor -> Asset Serialization). Also you should select "Visible Meta files" on "VersionControl Mode" in the same window. So you can open and read how Unity saves refrences and look into prefabs, meta files and scenes with an text editor (they are using YAML as descripion language).
And you could look into Unity source code: https://github.com/Unity-Technologies/UnityCsReference
enter image description here






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

Edmonton

Crossroads (UK TV series)