コード例 #1
0
 private void SensorReadingCollectionAssetGUI()
 {
     EditorGUILayout.BeginVertical(GUI.skin.box);
     GUILayout.Label("Sensor Reading Collection Asset Fields", EditorStyles.boldLabel);
     assetInstance = (SensorReadingCollectionAsset)
                     EditorGUILayout.ObjectField(assetInstance, typeof(SensorReadingCollectionAsset), true);
     EditorGUILayout.EndVertical();
 }
コード例 #2
0
 private static void CreateSensorReadingCollectionAsset()
 {
     // Only create asset if it doesn't exist already in resources folder
     if (Resources.Load <SensorReadingCollectionAsset>(SensorReadingCollectionAsset.AssetLoadPath) == null)
     {
         SensorReadingCollectionAsset newSensorReadingCollectionAsset = CreateInstance <SensorReadingCollectionAsset>();
         AssetDatabase.CreateAsset(newSensorReadingCollectionAsset, SensorReadingCollectionAsset.AssetCreationPath);
     }
 }
コード例 #3
0
    private SensorReadingCollectionAsset instance;              // Instance associated with this editor.

    private void OnEnable()
    {
        instance = (SensorReadingCollectionAsset)target;
    }