Пример #1
0
        public void OnEnable()
        {
            _target = target as Variable <T>;
            _fields = ExposeProperties.GetProperties(_target);

            _disposable = _target.AsObservable().Subscribe(value => {
                Repaint();
            });
        }
Пример #2
0
    void OnEnable()
    {
        // to resolve TlsException error
        ServicePointManager.ServerCertificateValidationCallback = Validator;

        scriptMachine = target as GoogleMachine;
        if (scriptMachine != null)
        {
            scriptMachine.ReInitialize();

            databaseFields = ExposeProperties.GetProperties(scriptMachine);
        }
    }
Пример #3
0
        public void OnEnable()
        {
            _target = target as Variable <T>;
            _fields = ExposeProperties.GetProperties(_target);

#if REACTIVE_VARIABLE_RX_ENABLED
            _disposable = _target.AsObservable().Subscribe(value => {
                Repaint();
            });
#else
            _target.OnValueChanged += HandleValueChanged;
#endif
        }
Пример #4
0
 private void OnEnable()
 {
     UpdateHandlePos();
     _instance          = target as IsoTransform;
     _instance.Position = _instance.Position;
     _instanceFields    = ExposeProperties.GetProperties(_instance);
     if (_instance == null)
     {
         return;
     }
     _instance.GetComponent <Transform>().hideFlags = HideFlags.HideInInspector;           //hides Transform component
     UnityEditorInternal.ComponentUtility.MoveComponentUp(_instance);
 }
Пример #5
0
    public override void OnEnable()
    {
        base.OnEnable();

        language data = target as language;

        databaseFields = ExposeProperties.GetProperties(data);

        foreach (languageData e in data.dataArray)
        {
            dataFields = ExposeProperties.GetProperties(e);
            pInfoList.Add(dataFields);
        }
    }
Пример #6
0
    public override void OnEnable()
    {
        base.OnEnable();

        SpawnList data = target as SpawnList;

        databaseFields = ExposeProperties.GetProperties(data);

        foreach (SpawnListData e in data.dataArray)
        {
            dataFields = ExposeProperties.GetProperties(e);
            pInfoList.Add(dataFields);
        }
    }
Пример #7
0
    public override void OnEnable()
    {
        base.OnEnable();

        MySpreadSheet data = target as MySpreadSheet;

        databaseFields = ExposeProperties.GetProperties(data);

        foreach (MyData e in data.dataArray)
        {
            dataFields = ExposeProperties.GetProperties(e);
            pInfoList.Add(dataFields);
        }
    }
Пример #8
0
    public override void OnInspectorGUI()
    {
        base.OnInspectorGUI();

        //DrawDefaultInspector();
        if (GUI.changed)
        {
            pInfoList.Clear();

            SpawnList data = target as SpawnList;
            foreach (SpawnListData e in data.dataArray)
            {
                dataFields = ExposeProperties.GetProperties(e);
                pInfoList.Add(dataFields);
            }

            EditorUtility.SetDirty(target);
            Repaint();
        }
    }
Пример #9
0
    void OnEnable()
    {
        // to resolve TlsException error
        ServicePointManager.ServerCertificateValidationCallback = Validator;

        machine = target as GoogleMachine;
        if (machine != null)
        {
            machine.ReInitialize();

            databaseFields = ExposeProperties.GetProperties(machine);

            if (string.IsNullOrEmpty(GoogleDataSettings.Instance.RuntimePath) == false)
            {
                machine.RuntimeClassPath = GoogleDataSettings.Instance.RuntimePath;
            }
            if (string.IsNullOrEmpty(GoogleDataSettings.Instance.EditorPath) == false)
            {
                machine.EditorClassPath = GoogleDataSettings.Instance.EditorPath;
            }
        }
    }
Пример #10
0
 public void OnEnable()
 {
     m_Instance = target as AZQuadGrid;
     m_fields   = ExposeProperties.GetProperties(m_Instance);
 }
Пример #11
0
    public override void DealWithEvent()
    {
        Event   current      = Event.current;
        int     controlID    = GUIUtility.GetControlID(FocusType.Passive);
        Vector3 collisionPos = MapModifier.Instance.CaculateCollisionPosFromGUIPoint(current.mousePosition);

        if (collisionPos.y == float.MaxValue)
        {
            return;
        }
        collisionPos = new Vector3(collisionPos.x, 0, collisionPos.z);
        Vector3 lefttopcenter = MapModifier.Instance.CaculateCellCenterByPos(collisionPos);
        int     lefttopindex  = MapModifier.Instance.CaculateIndexForPos(lefttopcenter);
        Vector3 size          = new Vector3(1, 0, 1);
        var     flag          = MapModifier.Instance.CheckContainUnreachable(lefttopindex, size);

        Handles.color = Color.green;
        Handles.DrawWireDisc(collisionPos, Vector3.up, .5f);
        //Debug.Log(current.type);
        if (isDrag == true)
        {
            MapAux.DrawRectHandles(startpoint, endpoint);
        }
        HandleUtility.AddDefaultControl(controlID);
        switch (current.type)
        {
        case EventType.mouseDown:
            if (current.button == 0 && (!isDrag))
            {
                startpoint = collisionPos;
            }
            break;

        case EventType.mouseUp:
            if (current.button == 0 && (isDrag == false))
            {
                MapModifier.Instance.AddPoint(startpoint);
            }
            else if (current.button == 0 && (isDrag == true))
            {
                endpoint = collisionPos;
                MapModifier.Instance.AddArea(startpoint, endpoint);
                isDrag = false;
            }
            break;

        case EventType.mouseDrag:
            if (current.button == 0)
            {
                endpoint = collisionPos;
                isDrag   = true;
            }
            break;

        default:
            break;
        }
        int curID = GUIUtility.hotControl;

        if (HandleRecorder.handleIDAndTarget.ContainsKey(curID))
        {
            curFocusID = curID;
        }
        if (HandleRecorder.handleIDAndTarget.ContainsKey(curFocusID))
        {
            // Handles.BeginGUI();
            // var re = SceneView.lastActiveSceneView.position;
            // GUILayout.BeginArea(new Rect(re.width / 4, re.height - 120, re.width/2, 120), EditorStyles.textArea);
            EditDetailsWindow.deleteAction = () =>
            {
                MapModifier.Instance.RemoveInfo(HandleRecorder.handleIDAndTarget[curFocusID]);
                HandleRecorder.handleIDAndTarget.Remove(curFocusID);
            };
            EditDetailsWindow.toDraw = ExposeProperties.GetProperties(HandleRecorder.handleIDAndTarget[curFocusID], out EditDetailsWindow.toDrawType);
            //ExposeProperties.Expose(m_fields);

            // GUILayout.EndArea();
            // Handles.EndGUI();
        }
        SceneView.RepaintAll();
    }
Пример #12
0
 public void OnEnable()
 {
     m_Instance = target as RenderBinoculars;
     m_fields   = ExposeProperties.GetProperties(m_Instance);
 }
 public void OnEnable()
 {
     m_Instance = target as SmoothFollowCamera;
     m_fields   = ExposeProperties.GetProperties(m_Instance);
 }
Пример #14
0
 public void OnEnable()
 {
     m_Instance = target as GameWordsManager;
     m_fields   = ExposeProperties.GetProperties(m_Instance);
 }
Пример #15
0
 void OnEnable()
 {
     instance        = target as IsoSorting;
     instance_Fields = ExposeProperties.GetProperties(instance);
 }
 public void OnEnable()
 {
     m_Instance = target as VarianceShadowMap;
     m_fields   = ExposeProperties.GetProperties(m_Instance);
 }
Пример #17
0
 public void OnEnable()
 {
     m_Instance = target as IntersectionNode;
     m_fields   = ExposeProperties.GetProperties(m_Instance);
 }
Пример #18
0
 public void OnEnable()
 {
     m_Instance = target as GraphRenderer;
     m_fields   = ExposeProperties.GetProperties(m_Instance);
 }
Пример #19
0
 public void OnEnable()
 {
     _instance   = target as TUIWindow;
     _properties = ExposeProperties.GetProperties(_instance);
 }
Пример #20
0
 public void OnEnable()
 {
     m_Instance = target as NodeHandle;
     m_fields   = ExposeProperties.GetProperties(m_Instance);
 }
Пример #21
0
 public virtual void OnEnable()
 {
     propertyFields = ExposeProperties.GetProperties(target);
 }
Пример #22
0
 /// <summary>
 ///   Called when the inspector gets active.
 /// </summary>
 public void OnEnable()
 {
     this.instance       = this.target as DebugInput;
     this.propertyFields = this.instance != null?ExposeProperties.GetProperties(this.instance) : null;
 }
Пример #23
0
 public void OnEnable()
 {
     m_Instance = target as CharacterStats;
     m_fields   = ExposeProperties.GetProperties(m_Instance);
 }
 void OnEnable()
 {
     instance        = target as IsoCapsuleCollider;
     instance_Fields = ExposeProperties.GetProperties(instance);
 }
 public void OnEnable()
 {
     m_Instance = target as VolumetricLineBehavior;
     m_fields   = ExposeProperties.GetProperties(m_Instance);
 }
Пример #26
0
 public void OnEnable()
 {
     m_instance = (SplineRuntimeEditor)target;
     m_fields   = ExposeProperties.GetProperties(m_instance);
 }
Пример #27
0
 public virtual void OnEnable()
 {
     m_Instance = target as ExposableMonoBehaviour;
     m_fields   = ExposeProperties.GetProperties(m_Instance);
 }
 void OnEnable()
 {
     _instance       = target as ExposedMonoBehaviour;
     _instanceFields = ExposeProperties.GetProperties(_instance);
 }
Пример #29
0
        //--------------------------------------
        //  Methods
        //--------------------------------------

        //--------------------------------------
        //  Events
        //--------------------------------------
        /// <summary>
        /// Raises the enable event.
        /// </summary>
        public void OnEnable()
        {
            trackableObjectComponent = target as TrackableObjectComponent;
            propertyField_array      = ExposeProperties.GetProperties(trackableObjectComponent);
        }
 void OnEnable()
 {
     instance        = target as IsoRigidbody;
     instance_Fields = ExposeProperties.GetProperties(instance);
 }