playMaker

Author Topic: Application Quit  (Read 1573 times)

Dan

  • Junior Playmaker
  • **
  • Posts: 52
    • View Profile
    • Personal Site
Application Quit
« on: July 08, 2017, 04:23:15 PM »

Having problems with Application Quit. I may be setting it up wrong. This is what I did:


1. FSM on Empty Game Object.


2. Listener State: Get Key Down; Key Escape; Send Event Application Quit. (Used the System Event for Application Quit transition)


3. Quit the Game State: Action - Application Quit.


Testing in the editor, it fires without a problem when I hit the ESC key. When I play test it, it crashes every time. Any ideas? Wrong setup?



« Last Edit: July 08, 2017, 04:28:33 PM by Dan »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 3605
    • View Profile
    • jinxtergames
Re: Application Quit
« Reply #1 on: July 08, 2017, 09:26:14 PM »
Hi,
When you change the event with a self made transition it should work.

The System Event  'Application Quit' you need to use if you want to do something when the game is stopped.
For example saving progress when the Application is stopped.


Dan

  • Junior Playmaker
  • **
  • Posts: 52
    • View Profile
    • Personal Site
Re: Application Quit
« Reply #2 on: July 08, 2017, 09:39:45 PM »
Hello,

I changed to a self made transition but the problem is still there. I attached a screenshot from the crash dump. Something about not having appropriate access to a virtual address.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 3605
    • View Profile
    • jinxtergames
Re: Application Quit
« Reply #3 on: July 08, 2017, 09:41:27 PM »
Hi,
Can you show how your States are set up and what Actions are in it.

Dan

  • Junior Playmaker
  • **
  • Posts: 52
    • View Profile
    • Personal Site
Re: Application Quit
« Reply #4 on: July 08, 2017, 09:46:47 PM »
Sure, screenshots attached with states one and two.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 3605
    • View Profile
    • jinxtergames
Re: Application Quit
« Reply #5 on: July 08, 2017, 09:57:23 PM »
Hi,
The ThirdPersonController Prefab, does this come from an asset?
Can you make a backup of your project and then remove the ThirdPersonController gameobject and make a built to test if it crashes then.

Dan

  • Junior Playmaker
  • **
  • Posts: 52
    • View Profile
    • Personal Site
Re: Application Quit
« Reply #6 on: July 08, 2017, 10:04:27 PM »
Sure no problem. I don't have much in the scene yet, just getting started. The ThirdPersonController is from the Standard Assets, Ethan character. I removed the ThirdPersonController from the Hieracrchy, did a new build and the same result.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 3605
    • View Profile
    • jinxtergames
Re: Application Quit
« Reply #7 on: July 08, 2017, 10:14:18 PM »
Hi, I will try to repo the issue

Dan

  • Junior Playmaker
  • **
  • Posts: 52
    • View Profile
    • Personal Site
Re: Application Quit
« Reply #8 on: July 08, 2017, 10:17:05 PM »
Here's the really odd thing. I did the same thing the other day on a different project, using ESC key to exit the game. It is setup the same way, only using system transition. I just ran the scene on that and it works fine. Same version of Unity, the only difference is I'm version control on the project that keeps crashing when I hit ESC. I'm wondering if that is causing a problem.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 3605
    • View Profile
    • jinxtergames
Re: Application Quit
« Reply #9 on: July 08, 2017, 10:27:11 PM »
Hi,
The issue might indeed be caused by the version control,

did you try to make a build on a different location not connect to version control.

i tried here (but without version control) and it works fine (Windows 8.1 Unity 5.5.4f1 Playmaker 1.8.4)

Dan

  • Junior Playmaker
  • **
  • Posts: 52
    • View Profile
    • Personal Site
Re: Application Quit
« Reply #10 on: July 08, 2017, 10:53:53 PM »
Ok, so I created a new project with the same imported assets and had exactly the same problem. The new project did not have version control.

However, with some testing I did find the culprit. Under the Standalone Player Options, the Display Resolution Dialog dropdown must show Disabled. So as long as I don't want to enable that for players then I should be good to go. It would be nice to learn why that happens and get it resolved. Thanks for your help, I greatly appreciate it.
« Last Edit: July 08, 2017, 10:56:10 PM by Dan »

Dan

  • Junior Playmaker
  • **
  • Posts: 52
    • View Profile
    • Personal Site
Re: Application Quit
« Reply #11 on: July 08, 2017, 10:58:57 PM »
I think it may be because if Display Resolution Dialog was enabled, then you hit ESC to exit configuration. Perhaps that is the conflict.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 3605
    • View Profile
    • jinxtergames
Re: Application Quit
« Reply #12 on: July 08, 2017, 11:39:22 PM »
Hi,
I tried both enabled and disabled, it seems to work fine here.

Maybe you can send a copy of your project is i can test here.
if you do, do not include the playmaker folder and Plugins/playmaker.

What version you are using (unity/os/playmaker)?

Dan

  • Junior Playmaker
  • **
  • Posts: 52
    • View Profile
    • Personal Site
Re: Application Quit
« Reply #13 on: July 09, 2017, 12:03:49 AM »
I don't know how to do the export you're asking for. When I click Export Package it just freezes up for half a minute then nothing. I will have to read up on how to do it.

Win 10
playMaker: Unity5.4.PlayMaker.1.8.4.f5 (this is the entire file name)
Unity 5.6.1f1

The playMaker file name shows the Unity version, followed by the playMaker version. It is designed to work with Unity 5.4 but I think it's the latest.

Dan

  • Junior Playmaker
  • **
  • Posts: 52
    • View Profile
    • Personal Site
Re: Application Quit
« Reply #14 on: July 09, 2017, 12:42:26 AM »
So I'm thinking the problem is the Unity version. I created a project in Unity 5.4.5f1 (64-bit), and everything works great. No crashes when hitting escape in the enabled mode, or with re-sizable windows. Looks like the lesson for me here is to only use the Unity version listed on the playMaker file. Unfortunately playMaker is already two versions behind the current one, and 2017.1 is launching soon.