mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-05-13 05:54:59 -05:00
Merge pull request #381 from SatorImaging/improve-prefab-retrieve-method
Add non-string based method to search prefab
This commit is contained in:
commit
f4bd91eeea
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user