void DisplayDetectZones() { if (triggerType.enumValueIndex == (int)EngineEventTriggerManager.TriggerType.DetectZones) { EditorExtensions.LabelFieldCustom("Add/Remove Detect Zones", FontStyle.Bold); detectZones.ArrayFieldButtons("Detect Zone", true, true, true, true, DetectZoneField); } }
void DisplayPreTriggers() { if (triggerType.enumValueIndex == (int)EngineEventTriggerManager.TriggerType.PreTrigger) { EditorExtensions.LabelFieldCustom("Add/Remove PreTriggers", FontStyle.Bold); preTriggers.ArrayFieldButtons("Pre Trigger", true, true, true, true, PreTriggerField); } }
public static void LayoutSyncSelectionArrayField (this SerializedProperty _layoutSyncSelectionArray, SerializedProperty _valueSelections, SerializedProperty _layoutMaster) { layoutMaster = _layoutMaster; var master = new SerializedObject(layoutMaster.objectReferenceValue); var layouts = master.FindProperty("layouts"); layoutNames = layouts.GetDisplayNames(); valueSelections = _valueSelections; _layoutSyncSelectionArray.ArrayFieldButtons("Value Sync", true, true, false, false, LayoutSyncSelectionField, true); master.Dispose(); }
void SetProperties() { EditorGUILayout.Space(); EditorGUILayout.PropertyField(brain); EditorExtensions.LabelFieldCustom("Add/Remove Switches", FontStyle.Bold); if (cinemachineSwitches.arraySize > 1) { defaultSwitch.intValue = EditorGUILayout.Popup("Default", defaultSwitch.intValue, source.GetSwitchNames()); } else { defaultSwitch.intValue = 0; } cinemachineSwitches.ArrayFieldButtons("Switch", true, true, true, true, CinemachineSwitchEditorExtensions.CinemachineCameraSwitchField); }
protected virtual void DisplayUIProperties() { EditorGUILayout.LabelField("UI Properties", boldStyle); EditorGUILayout.PropertyField(spawnUI); if (spawnUI.boolValue) { UIToSpawn.PrefabFieldWithComponent(typeof(UIEngineValueEntity)); EditorGUILayout.PropertyField(childOptions); } EditorGUILayout.PropertyField(syncValuesToUI); if (syncValuesToUI.boolValue) { entityLayoutSyncs.ArrayFieldButtons("Layout Sync", true, true, true, true, LayoutSyncField); } }
public virtual void SetProperties() { EditorGUILayout.Space(); if (Application.isPlaying) { EditorGUILayout.PropertyField(viewStats); if (viewStats.boolValue) { DisplayStats(); } } spawnables.ArrayFieldButtons("Spawn", false, false, true, false, DisplaySpawnables); spawnLocations.ArrayFieldButtons("Location", true, false, true, true, DisplaySpawnLocations); EditorGUILayout.LabelField("--------------"); waves.ArrayFieldButtons("Wave", false, false, false, false, DisplayWaves); }
static void DisplayActivation() { EditorExtensions.LabelFieldCustom("Activation Options", FontStyle.Bold); EditorGUILayout.PropertyField(activationAmount); if (activationAmount.enumValueIndex == (int)EngineEventTrigger.ActivationAmountType.Finite) { EditorGUILayout.PropertyField(maxActivations); } EditorGUILayout.PropertyField(activationType); if (activationType.enumValueIndex == (int)EngineEventTrigger.ActivationType.Solo || activationType.enumValueIndex == (int)EngineEventTrigger.ActivationType.Both) { EditorExtensions.LabelFieldCustom("Add/Remove Events", FontStyle.Bold); engineEvents.ArrayFieldButtons("Event", true, true, true, true, EngineEventExtensions.EngineEventField); } if (activationType.enumValueIndex == (int)EngineEventTrigger.ActivationType.Broadcast || activationType.enumValueIndex == (int)EngineEventTrigger.ActivationType.Both) { EditorExtensions.LabelFieldCustom("Add/Remove Receivers", FontStyle.Bold); receivers.ArrayFieldButtons("Receiver", true, true, true, true, EngineEventReceiverExtensions.TriggerEngineReceiverField); } }
void DisplayEvents() { if (triggerMask.intValue == (triggerMask.intValue | (1 << (int)Interactable.TriggerType.OnHoverEnter))) { EditorExtensions.LabelFieldCustom("On Hover Enter:", FontStyle.Bold); hoverEnterEvents.ArrayFieldButtons("Enter Event", true, true, true, true, EngineEventExtensions.EngineEventField); } if (triggerMask.intValue == (triggerMask.intValue | (1 << (int)Interactable.TriggerType.OnHoverStay))) { EditorExtensions.LabelFieldCustom("On Hover Stay:", FontStyle.Bold); hoverStayEvents.ArrayFieldButtons("Stay Event", true, true, true, true, EngineEventExtensions.EngineEventField); } if (triggerMask.intValue == (triggerMask.intValue | (1 << (int)Interactable.TriggerType.OnHoverExit))) { EditorExtensions.LabelFieldCustom("On Hover Exit:", FontStyle.Bold); hoverExitEvents.ArrayFieldButtons("Exit Event", true, true, true, true, EngineEventExtensions.EngineEventField); } if (triggerMask.intValue == (triggerMask.intValue | (1 << (int)Interactable.TriggerType.OnInteract))) { EditorExtensions.LabelFieldCustom("On Interact:", FontStyle.Bold); interactEvents.ArrayFieldButtons("Interact Event", true, true, true, true, EngineEventExtensions.EngineEventField); } }
void SetProperties() { EditorGUILayout.LabelField("------------------------"); EditorGUILayout.LabelField("CheckPoint Options"); EditorGUILayout.LabelField("------------------------"); EditorGUILayout.PropertyField(overrideCheckPoint); if (overrideCheckPoint.boolValue) { EditorGUILayout.PropertyField(checkPoint); } EditorGUILayout.PropertyField(detectMask); checkPoints.arraySize = Mathf.Clamp(checkPoints.arraySize, 2, int.MaxValue); checkPoints.ArrayFieldButtons("Checkpoint", true, false, true, true, DisplayCheckPoints); //playerstuff EditorGUILayout.LabelField("------------------------"); EditorGUILayout.LabelField("Player Options"); EditorGUILayout.LabelField("------------------------"); EditorGUILayout.PropertyField(playerSpawn); //saving EditorGUILayout.LabelField("------------------------"); EditorGUILayout.LabelField("Data Options"); EditorGUILayout.LabelField("------------------------"); EditorGUILayout.PropertyField(progressOnly); EditorGUILayout.PropertyField(saveProgressToDisc); EditorGUILayout.PropertyField(resetProgressOnQuit); //level finish EditorGUILayout.LabelField("------------------------"); EditorGUILayout.LabelField("On Level Finish"); EditorGUILayout.LabelField("------------------------"); EditorGUILayout.PropertyField(sceneUnlocked); EditorGUILayout.PropertyField(nextSceneToPlay); EditorGUILayout.PropertyField(freezeGame); EditorGUILayout.PropertyField(freezePlayer); EditorGUILayout.PropertyField(endTime); }
void SetProperties() { engineValueCategories.ArrayFieldButtons("Category", true, true, true, true, DisplayEngineValueCategories); }
public static void EngineValueSelectionArrayField(this SerializedProperty _valueSelectionArrayProperty, SerializedProperty _engineValueManager) { engineValueManager = _engineValueManager; _valueSelectionArrayProperty.ArrayFieldButtons("Engine Value", true, true, true, true, EngineValueSelectionField); }
public static void EngineValueEventArray(this SerializedProperty _property, SerializedProperty _engineEventManager) { engineEventManager = _engineEventManager; _property.ArrayFieldButtons("Event", true, true, true, true, EngineValueEventField); }
public static void EngineEventField(SerializedProperty _property, int _index) { eventName = _property.FindPropertyRelative("eventName"); affectedObjectOption = _property.FindPropertyRelative("affectedObjectOption"); sceneObject = _property.FindPropertyRelative("sceneObject"); sceneObjectType = sceneObject.FindPropertyRelative("sceneObjectType"); startType = _property.FindPropertyRelative("startType"); inputButton = _property.FindPropertyRelative("inputButton"); //event type eventTypeMask = _property.FindPropertyRelative("eventTypeMask"); //anim anims = _property.FindPropertyRelative("anims"); commons = _property.FindPropertyRelative("commons"); //method methods = _property.FindPropertyRelative("methods"); //interacts interacts = _property.FindPropertyRelative("interacts"); eventOptions = _property.FindPropertyRelative("eventOptions"); valueDeltaOptions = _property.FindPropertyRelative("valueDeltaOptions"); //common stuff delay = _property.FindPropertyRelative("delay"); repeat = _property.FindPropertyRelative("repeat"); repeatTime = _property.FindPropertyRelative("repeatTime"); finishType = _property.FindPropertyRelative("finishType"); totalTime = _property.FindPropertyRelative("totalTime"); finished = _property.FindPropertyRelative("finished"); active = _property.FindPropertyRelative("active"); //GetSources(_property); string label = "Event " + (_index + 1).ToString(); if (repeat.boolValue) { label += " (Repeating) "; } if (active.boolValue) { label += " (Active) "; } if (finished.boolValue) { label += " (Finished) "; } eventName.stringValue = label; EditorGUILayout.PropertyField(sceneObject); //start and trigger EditorGUILayout.PropertyField(startType); if (startType.enumValueIndex == (int)EngineEvent.StartType.OnInputAfterPreviousFinished) { EditorGUILayout.PropertyField(inputButton); } //event Type eventTypeMask.intValue = EditorGUILayout.MaskField("Event Mask", eventTypeMask.intValue, System.Enum.GetNames(typeof(EngineEvent.EventType))); //anim events if (eventTypeMask.intValue == (eventTypeMask.intValue | (1 << (int)EngineEvent.EventType.Common))) { EditorExtensions.LabelFieldCustom("Common Options", FontStyle.Bold); commons.ArrayFieldButtons("Common Event", true, true, true, true, EventOptionCommonField); } //anim events if (eventTypeMask.intValue == (eventTypeMask.intValue | (1 << (int)EngineEvent.EventType.Animator))) { EditorExtensions.LabelFieldCustom("Animator Options", FontStyle.Bold); anims.ArrayFieldButtons("Animator State", true, true, true, true, EventOptionAnimatorField); } //method events if (eventTypeMask.intValue == (eventTypeMask.intValue | (1 << (int)EngineEvent.EventType.CallMethod))) { EditorExtensions.LabelFieldCustom("Call Method Options", FontStyle.Bold); methods.ArrayFieldButtons("Method", true, true, true, true, EventOptionCallMethodField); } //interactFX if (eventTypeMask.intValue == (eventTypeMask.intValue | (1 << (int)EngineEvent.EventType.InteractFX))) { EditorExtensions.LabelFieldCustom("InteractFX Options", FontStyle.Bold); interacts.ArrayFieldButtons("InteractFX", true, true, true, true, EventOptionInteractFXField); } //Events if (eventTypeMask.intValue == (eventTypeMask.intValue | (1 << (int)EngineEvent.EventType.ValueDelta))) { EditorExtensions.LabelFieldCustom("Event Options", FontStyle.Bold); valueDeltaOptions.ArrayFieldButtons("ValueOption", true, true, true, true, EventOptionValueDeltaField); } //Events if (eventTypeMask.intValue == (eventTypeMask.intValue | (1 << (int)EngineEvent.EventType.Event))) { EditorExtensions.LabelFieldCustom("Event Options", FontStyle.Bold); eventOptions.ArrayFieldButtons("EventOption", true, true, true, true, EventOptionEventField); } EditorExtensions.LabelFieldCustom("Time Options", FontStyle.Bold); //delay EditorGUILayout.PropertyField(delay); //repeat EditorGUILayout.PropertyField(repeat); //repeat delay if (repeat.boolValue) { EditorGUILayout.PropertyField(repeatTime); } //finishtype EditorGUILayout.PropertyField(finishType); //totalTime if (finishType.enumValueIndex == 1) { EditorGUILayout.PropertyField(totalTime); } }
public virtual void SetProperties() { EditorGUILayout.Space(); detectZones.ArrayFieldButtons("Detect Zone", true, true, true, true, DisplayDetectZone); unitAITriggers.ArrayFieldButtons("AI Event Trigger", true, true, true, true, DisplayAITriggers); }
public static void EngineValueEntityArrayField(this SerializedProperty _valueUnitArrayProperty, SerializedProperty _engineValueManager, SerializedProperty _engineEventManager) { engineEventManager = _engineEventManager; engineValueManager = _engineValueManager; _valueUnitArrayProperty.ArrayFieldButtons("Entity Value", true, true, true, true, EngineValueEntityField); }
void DisplayTriggers() { EditorExtensions.LabelFieldCustom("Add/Remove Triggers", FontStyle.Bold); triggers.ArrayFieldButtons("Trigger", true, true, true, true, TriggerField); }
protected virtual void SetProperties() { EditorGUILayout.Space(); engineEvents.ArrayFieldButtons("Event Container", true, true, true, true, EngineEventField); }
void SetProperties() { pools.ArrayFieldButtons("Pool Object", true, true, true, true, DisplayPoolList); }
public virtual void SetProperties() { EditorGUILayout.Space(); EditorGUILayout.PropertyField(avatarImage); UILayouts.ArrayFieldButtons("UI Layouts", true, true, true, true, EngineValueUIField); }