Пример #1
0
            private void UpdateStateName()
            {
                _editorStateName = "<none>";

                switch (_editorLinkType)
                {
                case eType.External:
                {
                    if (_file._editorAsset != null)
                    {
                        TimelineStateMachine stateMachines = SerializeConverter.FromTextAsset <TimelineStateMachine>(_file._editorAsset);
                        TimelineState[]      states        = stateMachines._states;

                        foreach (TimelineState state in states)
                        {
                            if (state._stateId == _stateId)
                            {
                                _editorStateName = _file._editorAsset.name + ":" + StringUtils.GetFirstLine(state.GetDescription());
                                break;
                            }
                        }
                    }
                }
                break;

                case eType.Internal:
                {
                    if (GetTimelineState() != null)
                    {
                        _editorStateName = StringUtils.GetFirstLine(_timelineState.GetDescription());
                    }
                }
                break;
                }
            }