Asset loading rework

Asset unloading not final!
This commit is contained in:
Katboi01
2023-08-20 12:04:11 +02:00
parent 746ed8bcf0
commit 7369af2d5b
11 changed files with 1101 additions and 1069 deletions
+25
View File
@@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEngine;
public class UmaContainerProp : UmaContainer
{
public void LoadProp(UmaDatabaseEntry entry, Transform SetParent = null)
{
var go = entry.Load().Get<GameObject>();
var prop = Instantiate(go, SetParent ? SetParent : this.transform);
/*
foreach (Renderer r in prop.GetComponentsInChildren<Renderer>())
{
foreach (Material m in r.sharedMaterials)
{
//Shaders can be differentiated by checking m.shader.name
m.shader = Shader.Find("Unlit/Transparent Cutout");
}
}
*/
}
}