playMaker

Author Topic: SOLVED Why is a build not working when playing in Unity does?  (Read 7982 times)

markfrancombe

  • Sr. Member
  • ****
  • Posts: 337
    • View Profile
A weird one just happened.

A perfectly working Photon project that was ok before, suddenly WILL NOT BUILD correctly! Im sure its difficult to trouble shoot without posting the whole project, but basically it works when I play in Unity, but when I make a build it just doesnt. There no errors, and it launches. I see a button that should instantiate my photon character, when clicked, the character appears, but does not drop to the ground or react to WASD.. this works flawlessly when run in Unity...

Any hints as to what this may be? Are there some global settings regarding exporting that Im forgetting?

I can post a screen grab film if it helps...

Mark
« Last Edit: April 09, 2013, 07:49:03 AM by markfrancombe »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3318
  • Official Playmaker Support
    • View Profile
    • LinkedIn
Re: Why is a build not working when playing in Unity does?
« Reply #1 on: April 08, 2013, 08:48:34 AM »
Playmaker does some extra work in the editor to fix actions that have changed since the FSM was saved. E.g. An added parameter in the action. You should see info about this in the Editor Log.

In a release build, Playmaker does not do this extra work. That could be what's going on here.

More troubleshooting info:
https://hutonggames.fogbugz.com/default.asp?W624

markfrancombe

  • Sr. Member
  • ****
  • Posts: 337
    • View Profile
Re: Why is a build not working when playing in Unity does?
« Reply #2 on: April 08, 2013, 12:52:42 PM »
Ahh.. that MAY be it... Im not sure...
I have one extra clue... I have some OLD builds from exactly the same project (I restored from back-up) The old builds are still running fine, whereas if I run the new build, it indeed still works in the editor, but if I "build" it now, it doesnt... Surely that doesnt point to an updated action as the original action would be in the project, this more points to a Unity update?

I had some trouble recently (you may remember) after upgrading to latest version. I have now gone back to version 4.0. Although projects are working on the whole, Im getting a bunch of YELLOW warnings. I dont understand any one of them unfortunately...
I spose its something to do with them?

markfrancombe

  • Sr. Member
  • ****
  • Posts: 337
    • View Profile
Re: Why is a build not working when playing in Unity does?
« Reply #3 on: April 08, 2013, 01:39:47 PM »
Heres some films showing the issue:
First, to prove that it works in the Editor...
https://www.dropbox.com/s/pehy87wgw58zg2c/OK_in_Editor.mov

Second: to show how it SHOULD BE; this was an old build ,from before the problem
https://www.dropbox.com/s/9h4kmdjpiygy1wr/good_builds.mov

and third, what happens if I build now!!!
https://www.dropbox.com/s/je3k04pxbuleluw/Bad_build.mov

Just realised there was sound on.. I should have "talked you thru the thing!!!"
Anyway...
As you see I have a spawn point in the air, and the player appears, but doesnt drop. Now IM thinking about it, maybe one of the YELLOS ERRORS of which I spoke, IS the problem..

See screen shot, theres one about Third Person Controller... and being ignored...

PS: IM SO sorry IM posting so much these day, Im just haveing SO MANY problems as a result of this stupid Unity upgrade... I only wish I could get back to the config I had!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 13635
  • Official Playmaker Support
    • View Profile
Re: Why is a build not working when playing in Unity does?
« Reply #4 on: April 08, 2013, 10:30:35 PM »
Hi,


the fact that it's not falling on the floor involves the physics engine as well, so I would look for something around the physics set up too. Are you enabling disabling components when you instantiate?

you also should look at where exactly you instantiate your char, is it on the same spot?

bye,

 Jean

markfrancombe

  • Sr. Member
  • ****
  • Posts: 337
    • View Profile
Re: Why is a build not working when playing in Unity does?
« Reply #5 on: April 09, 2013, 12:49:20 AM »
Quote
you also should look at where exactly you instantiate your char, is it on the same spot?

What do you mean by this? The Sphere you see is the Spawn point
(On Photon Network Instantiate Im dragging in the spheres into the Spawn Point slots)

...you can see in the film showing working builds that I am spawning different characters (well for now the same character but with differntly painted textures, but thats the same as different characters

I agree that its probably physics related, but Im not turning anything off specifically.
And it doesn't explain why its ONLY not working on a build does it?

ONE MORE CLUE:
On loading this project I get 2 identical error check messages, but as soon as I click them they disappear. They are:
Game:Master Client switch watcher: Inform player about the new master: PhotonViewRpcBroadcastFsmEvent
Remote event must be a global event


I dont think I had this before, could this be related? I am not using Chat in may game, so that whole Fsm is disabled. As this relates to sending the chat system a message to display in the chat field, is that all it is? It cant find the chat? Or something else?




markfrancombe

  • Sr. Member
  • ****
  • Posts: 337
    • View Profile
SOLVED: Why is a build not working when playing in Unity does?
« Reply #6 on: April 09, 2013, 07:48:46 AM »
Solved, I think!

I must have imported the Unity standard Assets Character Controllers at some time, dont know why. But there was a duplicate of the Char control script.
My CHar was using one supplier by you guys as part of the Photon Demo, but on build, may have got befuddled?

I removed the Standard assets folder and it works again...
I havent REALLY TESTED yet, but so far, the guy falls to the floor as he should!!!
Time to tidy up this project I think...


Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2488
  • Yup.
    • View Profile
    • Cleverous
Re: SOLVED Why is a build not working when playing in Unity does?
« Reply #7 on: April 09, 2013, 08:58:41 AM »
I've been having issues with the Standard Assets since 4.0 as well. Especially Pro Image Effects.

markfrancombe

  • Sr. Member
  • ****
  • Posts: 337
    • View Profile
Re: SOLVED Why is a build not working when playing in Unity does?
« Reply #8 on: April 10, 2013, 12:03:50 AM »
As far as I understand it, Unity have, since 4 tried to begin to use, "proper" clean, legal code, where as before some of their stuff was a bit lazily coded, because "well if Unity Engine works, why worry"... now they are tightening up the syntax, so now, slightly dodgy code will throw a warning, encouraging you to tidy up, but soon, it may throw a warning.

Would be nice if they tidied up their OWN code though... but as this file was part of the old Character Controller stuff... I guess this is another example of them trying to push Mechanim on you... Im sure I go to it someday, but I really wished they had overhauled the OLD animation system, cos I liked it, it just had some annoyances (with cutting and pasting keyframes, or dragging.. etc)