protected override void OnShow(Node node, Asset asset) { var material = ResourceCache.GetMaterial(asset.RelativePathToAsset); var modelNode = node.CreateChild(); modelNode.SetScale(2f); modelNode.Rotate(new Quaternion(30, 30, 30), TransformSpace.Local); staticModel = modelNode.CreateComponent <StaticModel>(); //NOTE: this code went to Urho, will be replaced with the next Nuget update Technique[] result = new Technique[material.NumTechniques]; for (uint i = 0; i < material.NumTechniques; i++) { result[i] = material.GetTechnique(i); } if (result.Any(t => t.Name.Contains(nameof(CoreAssets.Techniques.DiffSkybox)))) { var skyNode = node.CreateChild(); var skybox = skyNode.CreateComponent <Skybox>(); skybox.Model = CoreAssets.Models.Box; skybox.SetMaterial(ResourceCache.GetMaterial(asset.RelativePathToAsset)); staticModel.Model = CoreAssets.Models.Box; } else { staticModel.Model = CoreAssets.Models.Sphere; } staticModel.SetMaterial(material); App.Input.KeyDown += OnKeyDown; }