mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-08-28 05:44:48 -05:00
Add non-string based method to search prefab
This commit is contained in:
@@ -95,6 +95,12 @@ namespace VRM
|
||||
}
|
||||
|
||||
var prefab = AssetDatabase.LoadAssetAtPath<GameObject>(assetPath);
|
||||
// search prefab if nothing
|
||||
if (prefab == null && 0 < (target as BlendShapeAvatar).Clips.Count)
|
||||
{
|
||||
prefab = (target as BlendShapeAvatar).Clips[0].Prefab;
|
||||
}
|
||||
// once more, with string-based method
|
||||
if (prefab == null)
|
||||
{
|
||||
var parent = UniGLTF.UnityPath.FromUnityPath(assetPath).Parent;
|
||||
|
||||
Reference in New Issue
Block a user