コード例 #1
0
ファイル: TinySMEditorFile.cs プロジェクト: cowtrix/tinysm
    internal ITransition DefaultTransition()
    {
        var genericType = StateMachineDefinition.GetType().GetInterface(typeof(IStateMachineDefinition <,>).Name);

        if (genericType == null)
        {
            Debug.LogError($"State machine type {StateMachineDefinition.GetType()} did not contain an IStateMachine");
        }
        return(Activator.CreateInstance(typeof(Transition <,>).MakeGenericType(genericType)) as ITransition);
    }