Fix animator controller creation
This commit is contained in:
parent
accf7e787f
commit
3841a14d76
1 changed files with 9 additions and 7 deletions
|
|
@ -18,7 +18,7 @@ namespace gay.lilyy.SoldAvatarBootstrap
|
|||
{
|
||||
public AacFlBase aac;
|
||||
public GameObject root;
|
||||
public AacFlController fx;
|
||||
public AnimatorController fx;
|
||||
public AacFlClip emptyClip;
|
||||
public bool experimentalEnabled;
|
||||
public bool isPC;
|
||||
|
|
@ -210,12 +210,15 @@ namespace gay.lilyy.SoldAvatarBootstrap
|
|||
return;
|
||||
}
|
||||
|
||||
AvatarAssets assets = new();
|
||||
assets.root = root;
|
||||
AvatarAssets assets = new()
|
||||
{
|
||||
root = root,
|
||||
|
||||
assets.isPC = EditorUserBuildSettings.activeBuildTarget == BuildTarget.StandaloneWindows
|
||||
|| EditorUserBuildSettings.activeBuildTarget == BuildTarget.StandaloneWindows64;
|
||||
isPC = EditorUserBuildSettings.activeBuildTarget == BuildTarget.StandaloneWindows
|
||||
|| EditorUserBuildSettings.activeBuildTarget == BuildTarget.StandaloneWindows64,
|
||||
|
||||
fx = GetController(definition)
|
||||
};
|
||||
|
||||
|
||||
// Time AAC initialization
|
||||
|
|
@ -227,13 +230,12 @@ namespace gay.lilyy.SoldAvatarBootstrap
|
|||
AnimatorRoot = root.transform,
|
||||
DefaultValueRoot = root.transform,
|
||||
AssetKey = GUID.Generate().ToString(),
|
||||
AssetContainer = GetController(definition),
|
||||
AssetContainer = assets.fx,
|
||||
ContainerMode = AacConfiguration.Container.Everything,
|
||||
DefaultsProvider = new AacDefaultsProvider(true)
|
||||
});
|
||||
assets.emptyClip = assets.aac.NewClip();
|
||||
|
||||
assets.fx = assets.aac.NewAnimatorController();
|
||||
initStopwatch.Stop();
|
||||
AvatarLogger.LogInfo($"AAC initialization completed in {initStopwatch.ElapsedMilliseconds}ms");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue