BeatSaberMarkupLanguage/BeatSaberUI.cs
/// <summary>
/// Creates a ViewController of type T, and marks it to not be destroyed.
/// </summary>
/// <typeparam name="T">The variation of ViewController you want to create.</typeparam>
/// <returns>The newly created ViewController of type T.</returns>
Creates a ViewController of type T, and marks it to not be destroyed.
Creates a ViewController of type T and marks it to not be destroyed .
public static T CreateViewController<T>() where T : ViewController
        {
            T vc = new GameObject("BSMLViewController").AddComponent<T>();
            MonoBehaviour.DontDestroyOnLoad(vc.gameObject);
            vc.rectTransform.anchorMin = new Vector2(0f, 0f);
            vc.rectTransform.anchorMax = new Vector2(1f, 1f);
            vc.rectTransform.sizeDelta = new Vector2(0f, 0f);
            vc.rectTransform.anchoredPosition = new Vector2(0f, 0f);
            return vc;
        }
public static T CreateViewController < T > ( ) where T : ViewController { T vc = new GameObject ( " " ) . AddComponent < T > ( ) ; MonoBehaviour . DontDestroyOnLoad ( vc . gameObject ) ; vc . rectTransform . anchorMin = new Vector2 ( 0f , 0f ) ; vc . rectTransform . anchorMax = new Vector2 ( 1f , 1f ) ; vc . rectTransform . sizeDelta = new Vector2 ( 0f , 0f ) ; vc . rectTransform . anchoredPosition = new Vector2 ( 0f , 0f ) ; return vc ; }
Creates a ViewController of type T, and marks it to not be destroyed.
Creates a ViewController of type T and marks it to not be destroyed .
The newly created ViewController of type T.
The newly created ViewController of type T .
typeparam
The variation of ViewController you want to create.
The variation of ViewController you want to create .