You can add an OR case to your preprocessor directives to always include the field when serializing data in the editor, like so:
#if SERVER_BUILD || UNITY_EDITOR
public int someServerOnlyVariableSetInInspector;
#if !SERVER_BUILD || UNITY_EDITOR
public int someClientOnlyVariableSetInInspector;
I'm sorry I neglected that case in my ...
Should the configuration files for entity types (be able to) just list all the component types an entity contains?
No. As it's been pointed out in the comments, "You'd presumably want to store more than just the type of each component, but also the values of its relevant parameters/properties/fields."
So, for example, your JSON file could look ...
Seem like a bug in Unity serialization, enumNames and enumValueIndex are unreliable for the inner enumeration type.
But there is a good news that Unity provides fieldInfo property for PropertyDrawer, so we can get the type information.
Here is the code and comments:
Rect fieldPosition = EditorGUI....
In Unity's Docs :
[Serialize] Referenced values cannot be shared between UnityEngine.Object instances. For example, two MonoBehaviours cannot share an object that is serialized by reference. Use ScriptableObjects instead to share data.
As Instantiate creates a new Unity Object, its data cannot be shared by reference by just decorating the ...