Saturday, October 20, 2018

c# - Unity Inspector Not Showing Serialized Variables Of Child


So I'm new to using Serialaiziblewtfever(I just cannot remember the correct spelling). In the Unity editor it works fine if I have something like:


[System.Seriliabizblewtfever]
Public class BaseClass{

public ChildClass showvariables;
}
[System.serializable]
Public class ChildClass{
public float nipz;
}

With that I can see the variables "nipz" in the inspector when I click the drop-down arrow. However, I want ChildClass to be an actual child class so I can manipulate variables inherited from the parent. So if I change it to:


Public class ChildClass:BaseClass


It stops working. It doesn't matter what class the "BaseClass" is. In the inspector it shows me "showvariables", but then has the field like how you can drag objects, transforms, etc, but no drop down list of any variables. Is there something I'm missing?




No comments:

Post a Comment

Simple past, Present perfect Past perfect

Can you tell me which form of the following sentences is the correct one please? Imagine two friends discussing the gym... I was in a good s...