Exemple #1
0
        private static UserSession CreateSession(SessionSettings settings)
        {
            var session = new GameObject("UserSession").AddComponent <UserSession>();

            session.m_settings = settings;// ? settings : Resources.Load("_Spaces SDK/Examples/Prefabs/Settings/_DefaultSessionSettings.asset") as SessionSettings;//.FindObjectsOfTypeAll<SessionSettings>().FirstOrDefault();

            return(session);
        }
Exemple #2
0
        void Start()
        {
            if (!m_settings)
            {
                var settings = Resources.FindObjectsOfTypeAll <SessionSettings>();
                m_settings = settings.FirstOrDefault();
            }

            m_settings.InitializePlatformServiceSettings();
            RestManager.PlatformSettings.LoadSavedSettings();
        }
    public static void GenerateShaderWidgets()
    {
        if (Selection.activeObject && Selection.activeObject is Spaces.UnityClient.SessionSettings)
        {
            Spaces.UnityClient.SessionSettings settings = Selection.activeObject as Spaces.UnityClient.SessionSettings;

            foreach (var item in settings.shaders)
            {
                if (item.shader)
                {
                    item.shaderInterface = GenerateShaderInterface(item.shader);
                }
            }
        }
    }