- Home /
I can't setting at once ModelImporter.sourceAvatar in script.
I can't setting ModelImporter.sourceAvatar in script at once.
var avatarAsset = AssetDatabase.LoadAssetAtPath(modelAssetPath, typeof(Avatar)) as Avatar;
Debug.Log("IsValid : " + avatarAsset.isValid);
importer.sourceAvatar = avatarAsset;
When I run above the code. importer.sourceAvatar is not applied at once. It's only working out as pressing "update' button in Inspector
How I can setting the problem at once? without update button.
problem.png
(21.0 kB)
Comment
Did you ever figure this out? I'm dealing with the same issue.
Answer by hzj730 · Dec 27, 2021 at 08:15 AM
Did you ever figure this out? I'm dealing with the same issue.
Your answer
![](https://koobas.hobune.stream/wayback/20220613193928im_/https://answers.unity.com/themes/thub/images/avi.jpg)