New answers tagged

0

You should look at C++ language concepts, such as passing by reference, address, and value. If I have a class, Foo, and another, Bar: class Bar { public: int num; }; class Foo { public: void doSomethingV(Bar bar); void doSomethingR(Bar& bar); void doSomethingA(Bar* bar); }; Look at the doSomething* member functions: the first one ...


3

Typically for a pure data change like this, we would not use separate classes. Instead, you could make your class non-abstract (say "BasicMob" to leave room if you need more complex mob classes in future) and give it one or several Factory Methods that populate the data of your mob to make a specific variant. eg.. public static BasicMob CreateFireElemental(...


1

I'm unable to reproduce the problem described in this question when using types that are derived from MonoBehaviour or ScriptableObject as shown above. Using the following code: public abstract class SomeBaseClass : ScriptableObject { public int baseClassInt = 5; } [CreateAssetMenu(fileName ="Derived.asset", menuName ="Testing/Some Derived Class")] ...


Top 50 recent answers are included