Пример #1
0
    private static void _CreateRoarPlayerPickerObject()
    {
        GameObject go = RoarObjectFactory.CreateGameObjectInScene("PlayerSelectionWidget");

        go.AddComponent <RoarPlayerSelectionWidget>();

        Selection.activeGameObject = go;
    }
Пример #2
0
    private static void _CreateRoarProfileViewerObject()
    {
        GameObject go = RoarObjectFactory.CreateGameObjectInScene("ProfileViewerWidget");

        go.AddComponent <RoarProfileViewerWidget>();

        Selection.activeGameObject = go;
    }
Пример #3
0
    private static void _CreateRoarLeaderboardsWidgetObject()
    {
        GameObject go = RoarObjectFactory.CreateGameObjectInScene("RoarLeaderboardsWidget");

        go.AddComponent <RoarLeaderboardsWidget>();

        DefaultRoar defaultRoar = GameObject.FindObjectOfType(typeof(DefaultRoar)) as DefaultRoar;

        go.transform.parent = defaultRoar.transform;

        Selection.activeGameObject = go;
    }
Пример #4
0
    public static void CreateRoarSceneObject()
    {
        if (ExistingComponentTypeExists(typeof(DefaultRoar)))
        {
            EditorUtility.DisplayDialog("Sorry!", "A DefaultRoar component is already located in this scene.", "OK");
        }
        else
        {
            GameObject go = RoarObjectFactory.CreateGameObjectInScene("Roar");
            go.AddComponent <DefaultRoar>();
            go.transform.parent = null;

            Selection.activeGameObject = go;
        }
    }