MFPS 1.6 - Tutorial Bots system doesn't working

General support.
Post Reply
User avatar
MAC
Contributor
Contributor
Posts: 95
Joined: Sun May 27, 2018 7:59 am
Contact:

Hello,

Well thank you for all littles fix made for the 1.6 !

Bot tool doesn't work, in step 1 when you exporting , you don't get an AISoldierNEW but an AiSoldier + your models NEW, the rig and other thing are not applied..

I tryed on a fresh install , using Unity 2019.2.17f1

I get this error .

Hope you can get it too.

Code: Select all

ArgumentNullException: Value cannot be null.
Parameter name: componentOrGameObject
UnityEditor.PrefabUtility.UnpackPrefabInstance (UnityEngine.GameObject instanceRoot, UnityEditor.PrefabUnpackMode unpackMode, UnityEditor.InteractionMode action) (at C:/buildslave/unity/build/Editor/Mono/Prefabs/PrefabUtility.cs:1621)
TutorialBots.ReplaceBotModel () (at Assets/MFPS/Scripts/Internal/Editor/MFPS/Tutorials/TutorialBots.cs:108)
TutorialBots.DrawModel () (at Assets/MFPS/Scripts/Internal/Editor/MFPS/Tutorials/TutorialBots.cs:61)
TutorialBots.WindowArea (System.Int32 window) (at Assets/MFPS/Scripts/Internal/Editor/MFPS/Tutorials/TutorialBots.cs:38)
MFPSEditor.TutorialWizard.OnGUI () (at <08b9a629bdaf4593a88828b77d0efa1b>:0)
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <567df3e0919241ba98db88bec4c6696f>:0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <567df3e0919241ba98db88bec4c6696f>:0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <567df3e0919241ba98db88bec4c6696f>:0)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:359)
UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:353)
UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:329)
UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect, System.Boolean floatingWindow, System.Boolean isBottomTab) (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:374)
UnityEditor.DockArea.OldOnGUI () (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:341)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:298)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:483)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:466)
UnityEngine.UIElements.IMGUIContainer.HandleEvent (UnityEngine.UIElements.EventBase evt) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:447)
UnityEngine.UIElements.MouseCaptureDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/Events/MouseCaptureDispatchingStrategy.cs:93)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:280)
UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at C:/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:156)
UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at C:/buildslave/unity/build/Modules/UIElements/Panel.cs:190)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:255)
UnityEngine.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at C:/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:78)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)
MFPS on HDRP --) https://ka2studio.net/
User avatar
Lovatto
Admin
Admin
Posts: 1834
Joined: Sun Dec 07, 2014 3:18 pm
Contact:

Hi,

Please try this:
in TutorialBots.cs line 106
change this:

Code: Select all

 GameObject botPrefab = PrefabUtility.InstantiatePrefab(bl_GameData.Instance.BotTeam1) as GameObject;
to this:

Code: Select all

 GameObject botPrefab = PrefabUtility.InstantiatePrefab(bl_GameData.Instance.BotTeam1.gameObject) as GameObject;
How to find your Invoice Number: Here
How to find your Order Number: Here
User avatar
MAC
Contributor
Contributor
Posts: 95
Joined: Sun May 27, 2018 7:59 am
Contact:

Hello,

Thank you for the fix .

The default ' T ' pose stay after creating the AISoldierNEW.

The rig and the scripts are ok, and its working ingame.

Image

Do you have something for this?

Cheer
MFPS on HDRP --) https://ka2studio.net/
User avatar
kylekov
New Member
New Member
Posts: 1
Joined: Fri Apr 15, 2022 6:08 am

I just ran into a similar issue with the bots model going to a t-pose and not being able to correctly place the weapon, i'm on MFPS 1.9.

It's a pretty simple fix, once you see it in the t-pose click on the AISoldier [NEW] in the Heirearchy and expand the gameobject to show the two children, "Helpers" and "Your model name [NEW]". Click on the model one and scroll down in the inspector at the bottom when I clicked on "Run Animator" my model suddenly assumed the aiming position. When you are done click the big Done yellow button.

Beware there is one other issue I had to fix before my new AI would actually shoot, before you save the prefab click on the AISoldier [NEW] and in the inspector scroll down to the second to last script: BI_AI Shooter References. The second to last option is "Player Animator", mine was missing so I had to click on the target button to the right of the missing animator field and select my new Model that is in the scene.
Post Reply