I have four similar objects in my game. As they are all similar therefore I have created a single script that defines mash for all of them. The script that defines mash for these objects uses a variable called
radius which I have imported from other file (by
classname.radius). The radius updates on every frame and it is the only property that is different for all objects.
To allow different radius for different objects, What I thought would work was, making four different classes of same name
classname. Creating variable
radius in all of them and giving them different values. Dragging first file to the first object, second file to second object and so on.. When executed, every time the script that generated mash considers
classname.radius from the file which is dragged to that object. But that isn't working. What is wrong and how can I implement it?
Seems I'm messing with OOPS concepts!