Esempio n. 1
0
 private static void CreatePropertiesCollectionAsset()
 {
     // Only create asset if it doesn't exist already in resources folder
     if (Resources.Load <PropertiesCollectionAsset>(PropertiesCollectionAsset.AssetLoadPath) == null)
     {
         PropertiesCollectionAsset newAllPropertiesInstance = CreateInstance <PropertiesCollectionAsset>();
         newAllPropertiesInstance.properties = new Property[0];
         AssetDatabase.CreateAsset(newAllPropertiesInstance, AssetCreationPath);
     }
 }
Esempio n. 2
0
    private const string AssetCreationPath = "Assets/Resources/PropertiesCollection.asset";     // Creation path of the properties collection asset via menu

    private void OnEnable()
    {
        PropertiesCollectionAssetInstance = (PropertiesCollectionAsset)target;
    }