Closed inkuxuan closed 3 months ago
Thank you for reporting!
It looks material slot animation targets unexpected property. Could you provide minimum information about the animation? (I'll explain how below.)
AAO expects animating m_Materials.Array.data[<number>]
if property name start with m_Materials.Array.data[
but it looks your animation doesn't.
Here's the way to provide minimum information about your animation. This will create text file that contains which property are animated in your avatar but it doesn't contain any animation curve information.
ModularAvatar/manual bake avatar
Tools/Avatar Optimizer/Animator Parser Debug Window V2
in tool bar above.Avatar
in the Animator Parser Debug Window V2.Parse
button.Copy Parsed Text
to copy the animation information@anatawa12 Thank you for your prompt reply.
- Click Copy Parsed Text to copy the animation information
On following your given step, this causes an error and copies nothing into the clipboard. Here is the details of the error.
(Note that the version of AAO which caused this error is 1.7.0)
NullReferenceException: Object reference not set to an instance of an object
Anatawa12.AvatarOptimizer.AnimatorParsersV2.AnimatorParserDebugWindow.CreateText (System.Boolean detailed) (at ./Packages/com.anatawa12.avatar-optimizer/Editor/AnimatorParserV2/AnimatorParserDebugWindow.cs:73)
Anatawa12.AvatarOptimizer.AnimatorParsersV2.AnimatorParserDebugWindow.OnGUI () (at ./Packages/com.anatawa12.avatar-optimizer/Editor/AnimatorParserV2/AnimatorParserDebugWindow.cs:35)
UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition) (at <347e3e2bef8c4deb82c9790c6e198135>:0)
UnityEditor.DockArea.DrawView (UnityEngine.Rect dockAreaRect) (at <347e3e2bef8c4deb82c9790c6e198135>:0)
UnityEditor.DockArea.OldOnGUI () (at <347e3e2bef8c4deb82c9790c6e198135>:0)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <d30253adcd2a48faba9ee2264e211f5a>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <d30253adcd2a48faba9ee2264e211f5a>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <d30253adcd2a48faba9ee2264e211f5a>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Boolean canAffectFocus) (at <d30253adcd2a48faba9ee2264e211f5a>:0)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUIRaw (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at <d30253adcd2a48faba9ee2264e211f5a>:0)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUI (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at <d30253adcd2a48faba9ee2264e211f5a>:0)
UnityEngine.UIElements.IMGUIContainer.ProcessEvent (UnityEngine.UIElements.EventBase evt) (at <d30253adcd2a48faba9ee2264e211f5a>:0)
UnityEngine.UIElements.CallbackEventHandler.HandleEvent (UnityEngine.UIElements.EventBase evt) (at <d30253adcd2a48faba9ee2264e211f5a>:0)
UnityEngine.UIElements.CallbackEventHandler.HandleEventAtCurrentTargetAndPhase (UnityEngine.UIElements.EventBase evt) (at <d30253adcd2a48faba9ee2264e211f5a>:0)
UnityEngine.UIElements.CallbackEventHandler.HandleEventAtTargetPhase (UnityEngine.UIElements.EventBase evt) (at <d30253adcd2a48faba9ee2264e211f5a>:0)
UnityEngine.UIElements.MouseCaptureDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <d30253adcd2a48faba9ee2264e211f5a>:0)
UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) (at <d30253adcd2a48faba9ee2264e211f5a>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <d30253adcd2a48faba9ee2264e211f5a>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at <d30253adcd2a48faba9ee2264e211f5a>:0)
UnityEngine.UIElements.EventDispatcher.OpenGate () (at <d30253adcd2a48faba9ee2264e211f5a>:0)
UnityEngine.UIElements.EventDispatcherGate.Dispose () (at <d30253adcd2a48faba9ee2264e211f5a>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <d30253adcd2a48faba9ee2264e211f5a>:0)
UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at <d30253adcd2a48faba9ee2264e211f5a>:0)
UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at <d30253adcd2a48faba9ee2264e211f5a>:0)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <d30253adcd2a48faba9ee2264e211f5a>:0)
UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at <d30253adcd2a48faba9ee2264e211f5a>:0)
UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <d30253adcd2a48faba9ee2264e211f5a>:0)
UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at <d30253adcd2a48faba9ee2264e211f5a>:0)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at <4397ca26b8a24183a25a95ffae967e39>:0)
Sorry, I found the debug window is not working with object reference curves. Could you manually let me know the property name of object reference curves?
Could you manually let me know the property name of object reference curves?
Sorry but I'm not sure what you are referring to by "object reference curves" Would you please provide some steps?
one exampleof object reference curve is material swapping animation. I want to see the property name of the property. One of the way is open animation clip with material swap animation and see left side to know property name.
Here is a screenshot of a material-swap animation used in the scene. I'm not sure how many animations are involved and do you need all of them?
Thank you. It looks animating File ID
and Path ID
is unknown to AAO and that's why it cause exception.
Do you know about the animation is for?
The Material Reference[N]
is well-known and AAO understands.
The animation is for swapping materials. I created them manually.
Umm... AFAIK, Material swapping animation only createsMaterial Reference[N]
... but Thank you.
Indeed, another animation swapping the same objects contains no FileID and PathID.
When using AAO 1.7.0 or later (tested with 1.7.0, 1.7.1, 1.7.3), the following error occurs.
This reproduces 100% on Unity 2022.3.6f1,
Avatar root object components:![image](https://github.com/anatawa12/AvatarOptimizer/assets/19793388/8bd23ce3-6bca-4049-ad74-7e4bd7b80551)
AAO Trace and Optimize is in all default settings.
This error does NOT occur on AAO 1.6.13 (The last version of 1.6) or earlier