UnityEditor.SessionState.GetVector3 C# (CSharp) Method

GetVector3() static private method

static private GetVector3 ( string key, Vector3 defaultValue ) : Vector3
key string
defaultValue Vector3
return Vector3
        internal static Vector3 GetVector3(string key, Vector3 defaultValue)
        {
            Vector3 vector;
            INTERNAL_CALL_GetVector3(key, ref defaultValue, out vector);
            return vector;
        }

Usage Example

        public bool InitializeIfNeeded(ParticleSystem shuriken)
        {
            ParticleSystem root = ParticleSystemEditorUtils.GetRoot(shuriken);
            bool           result;

            if (root == null)
            {
                result = false;
            }
            else
            {
                ParticleSystem[] particleSystems = ParticleEffectUI.GetParticleSystems(root);
                if (root == this.GetRoot())
                {
                    if (this.m_ParticleSystemCurveEditor != null && this.m_Emitters != null && particleSystems.Length == this.m_Emitters.Length)
                    {
                        this.m_SelectedParticleSystem = shuriken;
                        if (this.IsShowOnlySelectedMode())
                        {
                            this.RefreshShowOnlySelected();
                        }
                        result = false;
                        return(result);
                    }
                }
                if (this.m_ParticleSystemCurveEditor != null)
                {
                    this.Clear();
                }
                this.m_SelectedParticleSystem = shuriken;
                ParticleSystemEditorUtils.PerformCompleteResimulation();
                this.m_ParticleSystemCurveEditor = new ParticleSystemCurveEditor();
                this.m_ParticleSystemCurveEditor.Init();
                this.m_EmitterAreaWidth      = EditorPrefs.GetFloat("ParticleSystemEmitterAreaWidth", ParticleEffectUI.k_MinEmitterAreaSize.x);
                this.m_CurveEditorAreaHeight = EditorPrefs.GetFloat("ParticleSystemCurveEditorAreaHeight", ParticleEffectUI.k_MinCurveAreaSize.y);
                this.InitAllEmitters(particleSystems);
                this.m_ShowOnlySelectedMode = (this.m_Owner is ParticleSystemWindow && SessionState.GetBool("ShowSelected" + root.GetInstanceID(), false));
                if (this.IsShowOnlySelectedMode())
                {
                    this.RefreshShowOnlySelected();
                }
                this.m_EmitterAreaScrollPos.x = SessionState.GetFloat("CurrentEmitterAreaScroll", 0f);
                if (this.ShouldManagePlaybackState(root))
                {
                    Vector3 vector = SessionState.GetVector3("SimulationState" + root.GetInstanceID(), Vector3.zero);
                    if (root.GetInstanceID() == (int)vector.x)
                    {
                        float z = vector.z;
                        if (z > 0f)
                        {
                            ParticleSystemEditorUtils.editorPlaybackTime = z;
                        }
                    }
                    this.Play();
                }
                result = true;
            }
            return(result);
        }
All Usage Examples Of UnityEditor.SessionState::GetVector3