Giter Site home page Giter Site logo

Comments (10)

greggman avatar greggman commented on June 13, 2024

Did you pick Window->HappyFunTimes->Export for HappyFunTimes?

Right now you can only run the games from HappyFunTimes. After you export it will create .zip files. Run happyfuntimes, drag and drop the zip file for your platform into the happyfuntimes window and it should install it. Alternatively you can pick Window->HappyFunTimes->Install into Local Happyfuntimes

I've almost got a version ready that no longer needs the external happyfuntimes program at all. It will just run as a normal unity program and none of the special exporting feature are needed

Hopefully I'll have that ready as the 2.0 version of the plugin in 2 or 3 weeks

-gregg

from happyfuntimes.

greggman avatar greggman commented on June 13, 2024

If you'd like to beta test the new 2.0 version you can get it here

Please BACKUP YOUR WORK. Copy your entire project to a new folder and try this in the new folder

Steps

  1. Close Unity
  2. Delete Assets/Plugins/HFTRunner.cs, Assets/Plugins/HappyFunTimes.dll, and Assets/Plugins/Editor/HappyFunTimesEditor.dll
  3. Download the new plugin zip file
  4. Copy everything in inside the Assets folder in that zip file to your project EXCEPT files you changed. For example if you have a custom Assets/WebPlayerTemplates/HappyFunTimes/controller.html don't copy over that.
  5. Now open the project in Unity. You were probably using the PlayerSpawner or PlayerConnector script on one of your objects. (in the samples that's usually on an object called LevelManager). That script is probably missing now so reconnect it. Click the circle next to "Missing Script" and select PlayerSpawner or PlayerConnector, which ever one you were using before.
  6. Rename Assets/WebPlayerTemplates/HappyFunTimes to Assets/WebPlayerTemplates/HappyFunTimes2. Make sure Unity is the front app. Then rename back to
    Assets/WebPlayerTemplates/HappyFunTimes (this is because the new happyfuntimes has to copy files but it only copies new or modified files. Since your files already exist it can't tell. This rename makes it appear all the files are new).

Things to note:

  • I just got stuff barely working so I have no idea what issues there are
  • No need to run HappyFunTimes any more
  • Installation mode is not yet supported
  • Multiple machine games are not yet supported

from happyfuntimes.

cukiakimani avatar cukiakimani commented on June 13, 2024
  1. I did Window->HappyFunTimes->Export for HappyFunTimes

It exported a normal mac .app file in a bin folder. The bin folder being in the main project folder. It did throw the following errors. Even with those errors when I ran the exported .app file with happy fun times running. The game worked with controllers connecting to it just fine.

It only builds the open scene. Is there a way to build multiple scenes with this option?

System.ComponentModel.Win32Exception: ApplicationName='/Applications/HappyFunTimes.app/MacOS/bin/node', CommandLine='"/Applications/HappyFunTimes.app/MacOS/hft/cli/hft.js" "make-release" "/Users/Cukia/OneDrive/Development/Unity/Projects/happyfuntimes/bin" "--platforms=mac" "--json" "--src=/Users/Cukia/OneDrive/Development/Unity/Projects/happyfuntimes"', CurrentDirectory='/Users/Cukia/OneDrive/Development/Unity/Projects/happyfuntimes' at System.Diagnostics.Process.Start_noshell (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process) [0x00000] in <filename unknown>:0 at System.Diagnostics.Process.Start_common (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process) [0x00000] in <filename unknown>:0 at System.Diagnostics.Process.Start () [0x00000] in <filename unknown>:0 at (wrapper remoting-invoke-with-check) System.Diagnostics.Process:Start () at HappyFunTimesEditor.HFTCmdRunner.Run (System.String cmdPath, System.String[] arguments, System.String workingDirectory) [0x00000] in <filename unknown>:0 at HappyFunTimesEditor.HFTCmdRunner.HFTRun (System.String[] arguments, System.String workingDirectory) [0x00000] in <filename unknown>:0 at HappyFunTimesEditor.HFTExport.Export (HappyFunTimesEditor.Options options) [0x00000] in <filename unknown>:0 at HappyFunTimesEditor.HFTExportWindow.ExportHFT () [0x00000] in <filename unknown>:0 at HappyFunTimesEditor.HFTExportWindow.OnGUI () [0x00000] in <filename unknown>:0 UnityEngine.Debug:LogError(Object) HappyFunTimesEditor.HFTExportWindow:OnGUI() UnityEditor.DockArea:OnGUI()

and

NullReferenceException: (null) UnityEditor.SerializedObject..ctor (UnityEngine.Object obj) (at /Users/builduser/buildslave/unity/build/artifacts/generated/common/editor/SerializedPropertyBindings.gen.cs:68) HappyFunTimesEditor.HFTExportWindow.Init () HappyFunTimesEditor.HFTExportWindow.OnGUI () System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)

  1. When I Window->HappyFunTimes->Install into Local Happyfuntimes it just spat this out with no install into HFT.

System.ComponentModel.Win32Exception: ApplicationName='/Applications/HappyFunTimes.app/MacOS/bin/node', CommandLine='"/Applications/HappyFunTimes.app/MacOS/hft/cli/hft.js" "get-info" "DOgFIghting"', CurrentDirectory='/Users/Cukia/OneDrive/Development/Unity/Projects/happyfuntimes' at System.Diagnostics.Process.Start_noshell (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process) [0x00000] in <filename unknown>:0 at System.Diagnostics.Process.Start_common (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process) [0x00000] in <filename unknown>:0 at System.Diagnostics.Process.Start () [0x00000] in <filename unknown>:0 at (wrapper remoting-invoke-with-check) System.Diagnostics.Process:Start () at HappyFunTimesEditor.HFTCmdRunner.Run (System.String cmdPath, System.String[] arguments, System.String workingDirectory) [0x00000] in <filename unknown>:0 at HappyFunTimesEditor.HFTCmdRunner.HFTRun (System.String[] arguments, System.String workingDirectory) [0x00000] in <filename unknown>:0 at HappyFunTimesEditor.HFTExportWindow.ExportHFT () [0x00000] in <filename unknown>:0 at HappyFunTimesEditor.HFTExportWindow.OnGUI () [0x00000] in <filename unknown>:0 UnityEngine.Debug:LogError(Object) HappyFunTimesEditor.HFTExportWindow:OnGUI() UnityEditor.DockArea:OnGUI()

As of now what works is fine for now as I playtest the game. I will try the new HFT Unity plugin and let you know. Thanks! Love the plugin!

from happyfuntimes.

greggman avatar greggman commented on June 13, 2024

Try the new plugin. I'll cross my fingers it works

from happyfuntimes.

cukiakimani avatar cukiakimani commented on June 13, 2024

@greggman I tried the new plugin. It works okayish in the Unity Editor throws errors about

Could not load: HappyFunTimesAutoGeneratedDoNotEdit/scripts/bower_components/hft-utils/dist/2d.js

and the like but that's just on start up and then works fine.

I tried the build and that didn't work. It creates the server but connecting a controller throws these errors

GET http://10.0.0.6:18679/games/HFTUnity/scripts/bower_components/hft-utils/dist/audio.js Uncaught Error: Script error for: bower_components/hft-utils/dist/audio http://requirejs.org/docs/errors.html#scripterror

from happyfuntimes.

greggman avatar greggman commented on June 13, 2024

Try this

  1. Rename Assets/WebPlayerTemplates/HappyFunTimes to Assets/WebPlayerTemplates/HappyFunTimes2
  2. Make sure Unity is the top window
  3. Rename Assets/WebPlayerTemplates/HappyFunTimes2 back to Assets/WebPlayerTemplates/HappyFunTimes

Now try building again.

The new plugin needs to copy all the files but that folder but it only notices them when they are added or changed. Since in your case they already existed it didn't get a chance to copy them. Renaming should make it notice all the files

from happyfuntimes.

greggman avatar greggman commented on June 13, 2024

And please tell me if that fixes it 🙏

from happyfuntimes.

cukiakimani avatar cukiakimani commented on June 13, 2024

I did what you said. It stopped throwing the errors. Although the controllers are still not connecting. Here's what happens

  1. "Looking for happyfuntimes"
  2. Displays the controller for a split second (player doesn't spawn in game)
  3. "Switching games..."
  4. "Touch to reset"

If you touch to reset you just go through the same steps.

This is only in the build though. In the Unity Editor the controller connects and no errors.

from happyfuntimes.

greggman avatar greggman commented on June 13, 2024

Thanks for that info. That's really helpful! I will look into it

from happyfuntimes.

greggman avatar greggman commented on June 13, 2024

I uploaded a new version that seems to be work in builds. At least for me. It's still generating a few errors behind the scenes after you stop and start the game if controllers are waiting to reconnect. I'm trying to decide how best to deal with that and trying to decide how compatible to keep it with the previous system

In any case please give it a try using the steps listed above

from happyfuntimes.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.