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; } }
public NodeGraph LoadNodeGraph() { if (_file != null) { return(SerializeConverter.FromTextAsset <NodeGraph>(_file)); } return(null); }
public static TimelineStateMachine FromTextAsset(TextAsset asset, GameObject sourceObject = null) { TimelineStateMachine timelineStateMachine = SerializeConverter.FromTextAsset <TimelineStateMachine>(asset); if (sourceObject != null) { GameObjectRef.FixupGameObjectRefs(sourceObject, timelineStateMachine); } return(timelineStateMachine); }
public static void LoadStrings() { _localisationMap = null; TextAsset asset = Resources.Load(kDefaultLocalisationFilePath) as TextAsset; if (asset != null) { _localisationMap = SerializeConverter.FromTextAsset <LocalisationMap>(asset); } else { _localisationMap = new LocalisationMap(); } #if UNITY_EDITOR RefreshEditorKeys(); #endif }