BeatSaberMarkupLanguage/BeatSaberUI.cs
/// <summary>
/// Creates a FlowCoordinator of type T, and marks it to not be destroyed.
/// </summary>
/// <typeparam name="T">The variation of FlowCoordinator you want to create.</typeparam>
/// <returns>The newly created FlowCoordinator of type T.</returns>
Creates a FlowCoordinator of type T, and marks it to not be destroyed.
Creates a FlowCoordinator of type T and marks it to not be destroyed .
public static T CreateFlowCoordinator<T>() where T : FlowCoordinator
        {
            T flow = new GameObject("BSMLFlowCoordinator").AddComponent<T>();
            FieldInfo fieldInfo = typeof(FlowCoordinator).GetField("_baseInputModule", BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic);
            fieldInfo.SetValue(flow, fieldInfo.GetValue(MainFlowCoordinator));
            return flow;
        }
public static T CreateFlowCoordinator < T > ( ) where T : FlowCoordinator { T flow = new GameObject ( " " ) . AddComponent < T > ( ) ; FieldInfo fieldInfo = typeof ( FlowCoordinator ) . GetField ( " " , BindingFlags . Instance | BindingFlags . Static | BindingFlags . Public | BindingFlags . NonPublic ) ; fieldInfo . SetValue ( flow , fieldInfo . GetValue ( MainFlowCoordinator ) ) ; return flow ; }
Creates a FlowCoordinator of type T, and marks it to not be destroyed.
Creates a FlowCoordinator of type T and marks it to not be destroyed .
//flow.SetPrivateField("_baseInputModule", MainFlowCoordinator.GetPrivateField<BaseInputModule>("_baseInputModule")); //temp //
The newly created FlowCoordinator of type T.
The newly created FlowCoordinator of type T .
typeparam
The variation of FlowCoordinator you want to create.
The variation of FlowCoordinator you want to create .