protected virtual void Awake() { hash = P3dSerialization.TryRegister(this); }
protected virtual void OnDestroy() { P3dHelper.Destroy(bakedMesh); P3dSerialization.TryUnregister(this); }
public static void BuildMaterial(ref Material material, ref int materialHash, string path, string keyword = null) { material = P3dShader.BuildMaterial(path, keyword); materialHash = P3dSerialization.TryRegister(material); }