An implementation of the Data Prototype Model with a single source for Scriptable Objects. Allows for inheritance of Scriptable Objects like Prefabs.
ComponentInfo.Prototype.mp4
- Optionally override any serialized property.
- Entirely in editor, no standalone overhead.
- Support for components to also inherit and override from scriptable objects.
- Safety checks for circular/ self references.
See 'DebugComponentInfoAsset' & 'DebugComponent' for implementation. Your data class needs to extend 'ComponentInfo'
[System.Serializable]publicclassDebugComponentInfo:ComponentInfo{[SerializeField]privateintintValue;[SerializeField]privateVector3position;[SerializeField]privateTextureassetReference;}And your Scriptable Object is a concrete implementation of ComponentInfoAsset.
[CreateAssetMenu(fileName="DebugComponentInfo",menuName="Core/DebugComponentInfo")]publicclassDebugComponentInfoAsset:ComponentInfoAsset<DebugComponentInfo>{}Untested with version control. Currently when modifying a prototype any assets inheriting from that asset would also be modified. This could cause a large number of files to be checked out. Would look into not dirtying these assets and only save when building the player.