Пример #1
0
        private void Initialize()
        {
            if (initialized)
            {
                return;
            }

            initialized = true;

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

            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
        }
Пример #2
0
        private void Initialize()
        {
            if (initialized)
            {
                return;
            }

            initialized = true;

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

            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);
        }
        protected override void Awake()
        {
            base.Awake();

            drawArea = scrollView.content; int l = 201;;
            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++)
            {
                if (settings[i].HiddenVariables == null)
                {
                    settings[i] = InitRuntimeInspectorSettings(settings[i]);
                }
                VariableSet[] hiddenVariablesForTypes = settings[i].HiddenVariables;
                if (hiddenVariablesForTypes != null)
                {
                    for (int j = 0; j < hiddenVariablesForTypes.Length; j++)
                    {
                        VariableSet hiddenVariablesSet = hiddenVariablesForTypes[j];
                        if (hiddenVariablesSet.Init())
                        {
                            hiddenVariables.Add(hiddenVariablesSet);
                        }
                    }
                }

                VariableSet[] exposedVariablesForTypes = settings[i].ExposedVariables;
                if (exposedVariablesForTypes != null)
                {
                    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);
        }
Пример #4
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();
        }
Пример #5
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();
        }