playMaker

Author Topic: Another weird behaviour  (Read 2536 times)

megmaltese

  • Sr. Member
  • ****
  • Posts: 351
    • View Profile
Another weird behaviour
« on: May 11, 2016, 02:12:39 PM »
So, I have a prefab that is the classic Unity Character, updated with stuff and PlayMaker FSM.
I checked it: I clicked APPLY on the character in a map where this works perfectly, so the prefab is updated.
I made a new map, there's very few elements in it, dragged the Character prefab in it, and voilà: says there's no cameras rendering in the scene.
This modification I did to the character is that its cam renders to a texture, and the FSM creates the camera that reders the final view to the player.

OK I solved this while I had this post open, but still here there's something wrong, don't know if in Unity or PlayMaker, I think more in Unity though.
I solved by dragging the good Character on the prefab, replacing it effectively.
I can't understand how this is possible though, this means that APPLY doesn't completely replace the prefab, and at this point I don't know what is that button for really, I thought that when I clicked APPLY I made the prefab in the project the exact same of the one I had in the scene when I clicked APPLY. Useless button?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14228
  • Official Playmaker Support
    • View Profile
Re: Another weird behaviour
« Reply #1 on: May 11, 2016, 11:33:00 PM »
Hi,

 you are likely mistaken by the difference between an Fbx asset and a Prefab Asset.

 your fbx asset if dropped ontot the scene looks like a prefab, but it's not...

so make sure you drop back from the scene into a prefab the fbx ( so that you have the Fbx asset and next to it or somewhere else the prefab referencing that fbx character).

 Unity doesn't really show that difference, but I had issues with this too.

Bye,

 Jean

megmaltese

  • Sr. Member
  • ****
  • Posts: 351
    • View Profile
Re: Another weird behaviour
« Reply #2 on: May 12, 2016, 03:30:20 AM »
Man, I'm talking about the Unity Character here, not about any FBX!
« Last Edit: May 12, 2016, 04:52:53 AM by megmaltese »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14228
  • Official Playmaker Support
    • View Profile
Re: Another weird behaviour
« Reply #3 on: May 23, 2016, 08:26:53 AM »
Hi,

Ok :) then where do you take the skinned mesh and animation for this character? Apart from an fbx, I am not sure where you can get it.

Maybe you could do a screencast showing this issue, we may spot something during the process that's overlooked.

Bye,

 Jean


Bye

 Jean

megmaltese

  • Sr. Member
  • ****
  • Posts: 351
    • View Profile
Re: Another weird behaviour
« Reply #4 on: May 23, 2016, 09:04:39 PM »
Man... I have no problem with any FBX, my problem is with "reliableness" of Unity.

This is the part: "OK I solved this while I had this post open, but still here there's something wrong, don't know if in Unity or PlayMaker, I think more in Unity though.
I solved by dragging the good Character on the prefab, replacing it effectively.

I can't understand how this is possible though, this means that APPLY doesn't completely replace the prefab, and at this point I don't know what is that button for really, I thought that when I clicked APPLY I made the prefab in the project the exact same of the one I had in the scene when I clicked APPLY. Useless button?"

600

  • Beta Group
  • Hero Member
  • *
  • Posts: 591
    • View Profile
    • Car and Traffic Playmaker assets
Re: Another weird behaviour
« Reply #5 on: May 23, 2016, 10:10:53 PM »
Man... I have no problem with any FBX, my problem is with "reliableness" of Unity.

This is the part: "OK I solved this while I had this post open, but still here there's something wrong, don't know if in Unity or PlayMaker, I think more in Unity though.
I solved by dragging the good Character on the prefab, replacing it effectively.

I can't understand how this is possible though, this means that APPLY doesn't completely replace the prefab, and at this point I don't know what is that button for really, I thought that when I clicked APPLY I made the prefab in the project the exact same of the one I had in the scene when I clicked APPLY. Useless button?"
Hello,

About the APPLY, I have broken my prefabs a couple of times by editing it in the scene and while not applying go to project file and edit it there too, then later if you apply messy things happens as the scene reference was not saved and now the project file is different.

This way you can lose game object or FSM edits on the prefab. I believe it is a Unity thing, you should always hit apply on the prefab in the scene if you edit it and only then can click and go to the same prefab in the project folders.

Another finding, if there are many prefabs placed in the scene you want to edit, I usually open a empty scene to edit it and then go back so all of them got properly updated, had issue after a while if you do in the same scene (This might have been fixed/updated… I use Unity 5.2 mainly).

megmaltese

  • Sr. Member
  • ****
  • Posts: 351
    • View Profile
Re: Another weird behaviour
« Reply #6 on: May 23, 2016, 10:35:23 PM »
Ye I suspected some crap like that... one must make things the most obvious and simple possible or the system won't recognize what's happening. I think also that it's more a Unity thing, as this happened to me in the past as well not with PlayMaker but with other simple prefabs. The APPLY button simply doesn't work sometimes and the prefab remains blue like connected. They should definitely add another colour when a prefab is not completely connected or whatever, if this is not an unknown bug to them.

600

  • Beta Group
  • Hero Member
  • *
  • Posts: 591
    • View Profile
    • Car and Traffic Playmaker assets
Re: Another weird behaviour
« Reply #7 on: May 23, 2016, 10:42:24 PM »
APPLY will apply the changes, if you want to disconnect you can go upper menu Game Object>Brake Prefab Instance

megmaltese

  • Sr. Member
  • ****
  • Posts: 351
    • View Profile
Re: Another weird behaviour
« Reply #8 on: May 23, 2016, 11:25:22 PM »
No that's the problem. I hade this prefab, made changes, all is working but suddenly I find that no matter what, APPLY doesn't work anymore, but if I click SELECT, it selects THAT prefab, so clearly there is something wrong in the management of this thing.

600

  • Beta Group
  • Hero Member
  • *
  • Posts: 591
    • View Profile
    • Car and Traffic Playmaker assets
Re: Another weird behaviour
« Reply #9 on: May 24, 2016, 12:09:33 AM »
Yes encountered this too, in that case I usually create a new prefab by dropping from the scene to prefabs folder and delete the broken one, this wont be a solution if you use many of them in a scene.

megmaltese

  • Sr. Member
  • ****
  • Posts: 351
    • View Profile
Re: Another weird behaviour
« Reply #10 on: May 24, 2016, 12:25:02 AM »
Eh that's pretty easy and I did it too, but try to imagine if this happens with a prefab that you used THOUSANDS of times in your project... you will have to replace all those prefabs by hand.