private void OnEnable() { m_PreviewPosition = 0; m_MovingPlatform = target as MovingPlatform; if (!EditorApplication.isPlayingOrWillChangePlaymode) { MovingPlatformPreview.CreateNewPreview(m_MovingPlatform); } }
private void OnEnable() { m_PreviewPosition = 0; m_MovingPlatform = target as MovingPlatform; if (!EditorApplication.isPlayingOrWillChangePlaymode) { MovingPlatformPreview.CreateNewPreview(m_MovingPlatform); } m_PlatformCatcherProperty = serializedObject.FindProperty(nameof(m_MovingPlatform.platformCatcher)); m_IsMovingAtStartProperty = serializedObject.FindProperty(nameof(m_MovingPlatform.isMovingAtStart)); m_StartMovingOnlyWhenVisibleProperty = serializedObject.FindProperty(nameof(m_MovingPlatform.startMovingOnlyWhenVisible)); m_PlatformTypeProperty = serializedObject.FindProperty(nameof(m_MovingPlatform.platformType)); m_PlatformSpeedProperty = serializedObject.FindProperty(nameof(m_MovingPlatform.speed)); m_PlatformNodesProperty = serializedObject.FindProperty(nameof(m_MovingPlatform.localNodes)); m_PlatformWaitTimeProperty = serializedObject.FindProperty(nameof(m_MovingPlatform.waitTimes)); }
private void OnDisable() { MovingPlatformPreview.DestroyPreview(); }