Bug Error create new player v1.5

have a question or problem with some assets, inform the team to find a solution.

User avatar
haskoman
Contributor
Contributor
Posts: 73
Joined: Wed Aug 22, 2018 1:57 pm

Bug Error create new player v1.5

Postby haskoman » Thu Jul 11, 2019 2:55 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: 988
Joined: Sun Dec 07, 2014 3:18 pm
Contact:

Re: Bug Error create new player v1.5

Postby Lovatto » Thu Jul 11, 2019 4:08 pm

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

User avatar
haskoman
Contributor
Contributor
Posts: 73
Joined: Wed Aug 22, 2018 1:57 pm

Re: Bug Error create new player v1.5

Postby haskoman » Fri Jul 12, 2019 12:48 pm

yes i have version 2018 no 2019 ;) thanks i go try it more later

User avatar
haskoman
Contributor
Contributor
Posts: 73
Joined: Wed Aug 22, 2018 1:57 pm

Re: Bug Error create new player v1.5

Postby haskoman » Fri Jul 12, 2019 6:50 pm

work perfect

Return to “Support”

Who is online

Users browsing this forum: No registered users and 0 guests