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(); }
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); } }
private SensorReadingCollectionAsset instance; // Instance associated with this editor. private void OnEnable() { instance = (SensorReadingCollectionAsset)target; }