Example #1
0
        private void Initialize()
        {
            if (initialized)
            {
                return;
            }

            initialized = true;

            drawArea = scrollView.content;
            m_canvas = GetComponentInParent <Canvas>();

            GameObject poolParentGO = GameObject.Find(POOL_OBJECT_NAME);

            if (poolParentGO == null)
            {
                poolParentGO = new GameObject(POOL_OBJECT_NAME);
                DontDestroyOnLoad(poolParentGO);
            }

            poolParent = poolParentGO.transform;
            aliveInspectors++;

            for (int i = 0; i < settings.Length; i++)
            {
                VariableSet[] hiddenVariablesForTypes = settings[i].HiddenVariables;
                for (int j = 0; j < hiddenVariablesForTypes.Length; j++)
                {
                    VariableSet hiddenVariablesSet = hiddenVariablesForTypes[j];
                    if (hiddenVariablesSet.Init())
                    {
                        hiddenVariables.Add(hiddenVariablesSet);
                    }
                }

                VariableSet[] exposedVariablesForTypes = settings[i].ExposedVariables;
                for (int j = 0; j < exposedVariablesForTypes.Length; j++)
                {
                    VariableSet exposedVariablesSet = exposedVariablesForTypes[j];
                    if (exposedVariablesSet.Init())
                    {
                        exposedVariables.Add(exposedVariablesSet);
                    }
                }
            }

            RuntimeInspectorUtils.IgnoredTransformsInHierarchy.Add(drawArea);
            RuntimeInspectorUtils.IgnoredTransformsInHierarchy.Add(poolParent);
        }
Example #2
0
        protected override void Awake()
        {
            base.Awake();

            drawArea = scrollView.content;

            GameObject poolParentGO = GameObject.Find(POOL_OBJECT_NAME);

            if (poolParentGO == null)
            {
                poolParentGO = new GameObject(POOL_OBJECT_NAME);
                DontDestroyOnLoad(poolParentGO);
            }

            poolParent = poolParentGO.transform;
            aliveInspectors++;

            for (int i = 0; i < settings.Length; i++)
            {
                VariableSet[] hiddenVariablesForTypes = settings[i].HiddenVariables;
                for (int j = 0; j < hiddenVariablesForTypes.Length; j++)
                {
                    VariableSet hiddenVariablesSet = hiddenVariablesForTypes[j];
                    if (hiddenVariablesSet.Init())
                    {
                        hiddenVariables.Add(hiddenVariablesSet);
                    }
                }

                VariableSet[] exposedVariablesForTypes = settings[i].ExposedVariables;
                for (int j = 0; j < exposedVariablesForTypes.Length; j++)
                {
                    VariableSet exposedVariablesSet = exposedVariablesForTypes[j];
                    if (exposedVariablesSet.Init())
                    {
                        exposedVariables.Add(exposedVariablesSet);
                    }
                }
            }

            RuntimeInspectorUtils.IgnoredTransformsInHierarchy.Add(drawArea);
            RuntimeInspectorUtils.IgnoredTransformsInHierarchy.Add(poolParent);

            ColorPicker.Instance.Close();
            ObjectReferencePicker.Instance.Close();
        }
Example #3
0
        protected override void Awake()
        {
            base.Awake();

            drawArea = scrollView.content;

            GameObject poolParentGO = GameObject.Find(POOL_OBJECT_NAME);

            if (poolParentGO == null)
            {
                poolParentGO = new GameObject(POOL_OBJECT_NAME);
            }

            poolParent = poolParentGO.transform;

            for (int i = 0; i < settings.Length; i++)
            {
                VariableSet[] hiddenVariablesForTypes = settings[i].HiddenVariables;
                for (int j = 0; j < hiddenVariablesForTypes.Length; j++)
                {
                    VariableSet hiddenVariablesSet = hiddenVariablesForTypes[j];
                    if (hiddenVariablesSet.Init())
                    {
                        hiddenVariables.Add(hiddenVariablesSet);
                    }
                }

                VariableSet[] exposedVariablesForTypes = settings[i].ExposedVariables;
                for (int j = 0; j < exposedVariablesForTypes.Length; j++)
                {
                    VariableSet exposedVariablesSet = exposedVariablesForTypes[j];
                    if (exposedVariablesSet.Init())
                    {
                        exposedVariables.Add(exposedVariablesSet);
                    }
                }
            }

            ColorPicker.Instance.Close();
            ObjectReferencePicker.Instance.Close();
        }
Example #4
0
        private void Initialize()
        {
            if (initialized)
            {
                return;
            }

            initialized = true;

            drawArea             = scrollView.content;
            m_canvas             = GetComponentInParent <Canvas>();
            nullPointerEventData = new PointerEventData(null);

            if (m_showTooltips)
            {
                TooltipListener = gameObject.AddComponent <TooltipListener>();
                TooltipListener.Initialize(this);
            }

            GameObject poolParentGO = GameObject.Find(POOL_OBJECT_NAME);

            if (poolParentGO == null)
            {
                poolParentGO = new GameObject(POOL_OBJECT_NAME);
                DontDestroyOnLoad(poolParentGO);
            }

            poolParent = poolParentGO.transform;
            aliveInspectors++;

            for (int i = 0; i < settings.Length; i++)
            {
                if (!settings[i])
                {
                    continue;
                }

                VariableSet[] hiddenVariablesForTypes = settings[i].HiddenVariables;
                for (int j = 0; j < hiddenVariablesForTypes.Length; j++)
                {
                    VariableSet hiddenVariablesSet = hiddenVariablesForTypes[j];
                    if (hiddenVariablesSet.Init())
                    {
                        hiddenVariables.Add(hiddenVariablesSet);
                    }
                }

                VariableSet[] exposedVariablesForTypes = settings[i].ExposedVariables;
                for (int j = 0; j < exposedVariablesForTypes.Length; j++)
                {
                    VariableSet exposedVariablesSet = exposedVariablesForTypes[j];
                    if (exposedVariablesSet.Init())
                    {
                        exposedVariables.Add(exposedVariablesSet);
                    }
                }
            }

            RuntimeInspectorUtils.IgnoredTransformsInHierarchy.Add(drawArea);
            RuntimeInspectorUtils.IgnoredTransformsInHierarchy.Add(poolParent);

#if ENABLE_INPUT_SYSTEM && !ENABLE_LEGACY_INPUT_MANAGER
            // On new Input System, scroll sensitivity is much higher than legacy Input system
            scrollView.scrollSensitivity *= 0.25f;
#endif
        }