Bug Error create new player v1.5

General support.
Post Reply
User avatar
haskoman
Contributor
Contributor
Posts: 94
Joined: Wed Aug 22, 2018 1:57 pm

hi,

version 1.5 bug for create new player get error

Code: Select all

Setting the parent of a transform which resides in a Prefab instance is not possible (GameObject: 'RemoteGuns').
UnityEngine.Transform:set_parent(Transform)
AddPlayerTutorial:SetUpModelInPrefab() (at Assets/MFPS/Scripts/Internal/Editor/MFPS/Tutorials/AddPlayerTutorial.cs:428)
AddPlayerTutorial:DrawPlayerPrefab() (at Assets/MFPS/Scripts/Internal/Editor/MFPS/Tutorials/AddPlayerTutorial.cs:262)
AddPlayerTutorial:WindowArea(Int32) (at Assets/MFPS/Scripts/Internal/Editor/MFPS/Tutorials/AddPlayerTutorial.cs:63)
MFPSEditor.TutorialWizard:OnGUI()
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
help please
User avatar
Lovatto
Admin
Admin
Posts: 1834
Joined: Sun Dec 07, 2014 3:18 pm
Contact:

hmm... which Unity version are you using? I test on 2019.1.8 and doesn't receive this error,
try this:
in AddPlayerTutorial.cs -> SetUpModelInPrefab() -> replace this code:

Code: Select all

#if UNITY_2018_3_OR_NEWER
        PrefabUtility.UnpackPrefabInstance(PlayerModel, PrefabUnpackMode.Completely, InteractionMode.AutomatedAction);
#endif
with this:

Code: Select all

#if UNITY_2018_3_OR_NEWER
        if (PrefabUtility.GetPrefabInstanceStatus(PlayerInstantiated) == PrefabInstanceStatus.Connected)
        {
            PrefabUtility.UnpackPrefabInstance(PlayerInstantiated, PrefabUnpackMode.Completely, InteractionMode.AutomatedAction);
        }
        if (PrefabUtility.GetPrefabInstanceStatus(PlayerModel) == PrefabInstanceStatus.Connected)
        {
            PrefabUtility.UnpackPrefabInstance(PlayerModel, PrefabUnpackMode.Completely, InteractionMode.AutomatedAction);
        }
#endif
How to find your Invoice Number: Here
How to find your Order Number: Here
User avatar
haskoman
Contributor
Contributor
Posts: 94
Joined: Wed Aug 22, 2018 1:57 pm

yes i have version 2018 no 2019 ;) thanks i go try it more later
User avatar
haskoman
Contributor
Contributor
Posts: 94
Joined: Wed Aug 22, 2018 1:57 pm

work perfect
Post Reply