public static void OnPostprocessAllAssets(string[] imported, string[] deleted, string[] movedTo, string[] movedFrom)
        {
            bool playing = ProxyEditor.IsPlaying() || ProxyEditor.IsChanging();

            if (!playing)
            {
                Events.Call("On Asset Changed");
            }
        }
Exemple #2
0
        public override void OnInspectorGUI()
        {
            this.title  = "Input";
            this.header = this.header ?? File.GetAsset <Texture2D>("InputIcon.png");
            base.OnInspectorGUI();
            var target = this.target.As <InputManager>();

            if (ProxyEditor.IsPlaying())
            {
                var current = Event.current;
                if (current.isKey || current.shift || current.alt || current.control || current.command)
                {
                    if (!target.devices.Exists(x => x.name == "Keyboard"))
                    {
                        target.devices.Add(new InputDevice("Keyboard"));
                    }
                }
            }
        }