/**
     * Called to draw the custom inspector
     */
    public override void OnInspectorGUI()
    {
        // Getting target
        PlayerSphereController controller = (PlayerSphereController)target;

        InspectorHelper.DisplaySeparator("Weapon");
        WeaponSection(controller);

        InspectorHelper.DisplaySeparator("Debug");
        DebugSection(controller);

        EditorUtility.SetDirty(controller);
    }
    /**
     * Called to draw the custom inspector
     */
    public override void OnInspectorGUI()
    {
        // Buffering info
        PlayerInputController controller = (PlayerInputController)target;

        // Rendering
        InspectorHelper.DisplayInfoMessage("You can modify all player settings from this custom editor window");
        InspectorHelper.DisplaySeparator("Player input settings");
        InputSection(controller);

        // Editor bug fix with custom window
        EditorUtility.SetDirty(controller);
    }
Exemplo n.º 3
0
    /**
     * Called to draw the custom inspector
     */
    public override void OnInspectorGUI()
    {
        // Buffering info
        Arena instance = (Arena)target;

        // Rendering
        InspectorHelper.DisplayInfoMessage("Here you can set up the arena");
        InspectorHelper.DisplaySeparator("Physics");
        PhysicSection(instance);

        // Editor bug fix with custom window
        EditorUtility.SetDirty(instance);
    }
    /**
     * Called to draw the custom inspector
     */
    public override void OnInspectorGUI()
    {
        // Buffering info
        SoundEvent soundEvent = (SoundEvent)target;

        InspectorHelper.DisplaySeparator("Informations");
        soundEvent.SoundEventName = EditorGUILayout.TextField("Name", soundEvent.SoundEventName);

        EditorGUILayout.Space();
        InspectorHelper.DisplaySeparator("Event type");
        soundEvent.Play = EditorGUILayout.Toggle("Type Play", soundEvent.Play);
        soundEvent.Stop = EditorGUILayout.Toggle("Type Stop", soundEvent.Stop);

        EditorGUILayout.Space();
        InspectorHelper.DisplaySeparator("Settings");
        if (soundEvent.Play)
        {
            soundEvent.SoundEventType        = (SoundEvent.Type)EditorGUILayout.EnumPopup(soundEvent.SoundEventType);
            soundEvent.SoundEventLoop        = EditorGUILayout.Toggle("Loop ", soundEvent.SoundEventLoop);
            soundEvent.SoundEventTarget      = EditorGUILayout.ObjectField(soundEvent.SoundEventTarget, typeof(AudioClip), false) as AudioClip;
            soundEvent.SoundEventMaxInstance = EditorGUILayout.IntField("Max instance", soundEvent.SoundEventMaxInstance);
            soundEvent.SoundEventVolume      = EditorGUILayout.FloatField("Volume", soundEvent.SoundEventVolume);
            soundEvent.SoundEventPitch       = EditorGUILayout.FloatField("Pitch ", soundEvent.SoundEventPitch);
            soundEvent.SoundEventReverb      = EditorGUILayout.FloatField("Reverb", soundEvent.SoundEventReverb);

            soundEvent.RandomizePitch  = EditorGUILayout.Toggle("Randomize pitch ", soundEvent.RandomizePitch);
            soundEvent.RandomizeVolume = EditorGUILayout.Toggle("Randomize volume", soundEvent.RandomizeVolume);

            if (soundEvent.RandomizePitch)
            {
                soundEvent.PitchRandomRange = EditorGUILayout.Vector2Field("Pitch random range  ", soundEvent.PitchRandomRange);
            }

            if (soundEvent.RandomizeVolume)
            {
                soundEvent.VolumeRandomRange = EditorGUILayout.Vector2Field("Volume random range", soundEvent.VolumeRandomRange);
            }
        }

        if (soundEvent.Stop)
        {
            soundEvent.SoundEventTarget = EditorGUILayout.ObjectField(soundEvent.SoundEventTarget, typeof(AudioClip), false) as AudioClip;
        }

        // Editor bug fix with custom window
        EditorUtility.SetDirty(soundEvent);
    }
    /**
     * Called to draw the custom inspector
     */
    public override void OnInspectorGUI()
    {
        // Buffering info
        PlayerController controller = (PlayerController)target;

        playerBody = controller.GetComponent <Rigidbody2D>();

        // Rendering
        InspectorHelper.DisplaySeparator("Rendering");
        RenderingSection(controller);

        // Gameplay
        InspectorHelper.DisplaySeparator("Gameplay");
        GameplaySection(controller);

        DrawDefaultInspector();

        // Editor bug fix with custom window
        EditorUtility.SetDirty(controller);
    }