Unable to add System.DateTime variable to a game object
I am programatically creating a game obecjt and attaching a script with add variables to the aforementioned object - which is fine. However when attempting to add;
public System.DateTime dob
I notice that the variable 'dob' is not being added to the game object.
How would I adapt this easily?
by that you mean it's not shown in the inspector? If that's the case you probably need to write a property drawer to help Unity how to read it and what to show:
https://unity3d.com/de/learn/tutorials/topics/interface-essentials/building-custom-inspector
https://docs.unity3d.com/$$anonymous$$anual/editor-PropertyDrawers.html
Furthermore, you need to write your own serializer for it because the engine shows the serialized values, not the content of the type directly:
https://docs.unity3d.com/$$anonymous$$anual/script-Serialization.html