- Home /
Programming custom objects instead of using GameObjects
I'd like to know if it's at all possible to program a custom object as a class instead of composing it out of GameObjects with component attachments.
While I do appreciate the benefits of the GameObject system, I'm very used to how building objects work in other engines --
IE, the whole thing is just one self-encapsulated class with direct access to all relevant variables.
As it is, I don't particularly like having to use GetComponent<>() as much as I do and would prefer being able to collect everything important into a single script extended from a tree of successively more basic scripts, sort of like how Unrealscript works.
Is this sort of thing even possible, or should I just learn to live with Unity's way of organizing this?
isn't it possible to just rewrite the class from unreal script drawing from the variables that unity uses, and making exactly the same self encapsulated class as unreal by redefining the unity object variables in a different format?
if you think there is a more convenient and practical way to use GameObjects, add and delete scripts, materials, physics etc to them than the way unity uses, you could just rewrite a code wrapper in between your method and the unity syntax, and make it available for everyone!
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Difference between gameObject.transform and just transform? 1 Answer
Can a GameObject's full inspector be drawn in a custom Editor Window ? 1 Answer
GameObjects with custom properties into a GUI textbox. 0 Answers
Is there a way to create new GameObjects in your scene from constructors? 3 Answers