private void OnEnable() { billboard = (DirectionalBillboard)target; settings = DirectionBillboardSettings.GetSerializedSettings(); spDirectionList = serializedObject.FindProperty("directions"); spWaitTime = serializedObject.FindProperty("waitTime"); spLoop = serializedObject.FindProperty("loop"); spReset = serializedObject.FindProperty("resetFrameWhenChangeDirection"); EditorApplication.update = Update; }
public static SettingsProvider CreateMyCustomSettingsProvider() { var provider = new SettingsProvider("Preferences/Directional Sprite Preference", SettingsScope.User) { label = "Directional Sprite Preference", guiHandler = (searchContext) => { var settings = DirectionBillboardSettings.GetSerializedSettings(); EditorGUILayout.PropertyField(settings.FindProperty("currentDirection"), new GUIContent("Forward Position")); settings.ApplyModifiedProperties(); }, keywords = new HashSet <string>(new[] { "Billboard", "Directional Sprite", "Current Direction" }) }; return(provider); }