Beispiel #1
0
        public static async Task <GameObject> GetSvrfModelAsync(MediaModel model, SvrfModelOptions options = null, GameObject gameObject = null)
        {
            // It's impossible to use null coalescing operator with Unity objects.
            gameObject = gameObject == null ? new GameObject("Svrf Model") : gameObject;
            options    = options ?? DefaultOptions;

            await SvrfModelUtility.AddSvrfModel(gameObject, model, options);

            return(gameObject);
        }
Beispiel #2
0
        public async void Start()
        {
            var model   = (await SvrfApi.Media.GetByIdAsync(SvrfModelId)).Media;
            var options = new SvrfModelOptions
            {
                ShaderOverride = ShaderOverride,
                WithOccluder   = WithOccluder
            };

            await SvrfModelUtility.AddSvrfModel(gameObject, model, options);

            IsLoading = false;
        }