Unity : using native preview instead of compiling to localhost?

Hi all. Is there a way to use the native unity preview mode via the unity play button (rather than previewing web on localhost)?

It’s faster for me to see the results of my visual scripting to move things around rather than compiling to web. Also, i am automatically FTP’ing when i click “Build & Depoly” anyway. I’d rather do my scene editing in unity’s preview.

Thanks.

Hi Alpay,

To use the native Unity preview mode instead of previewing your web project on localhost, ensure that you have the correct setup in the Needle Engine. You can utilize the Play button in the Unity editor for quicker visual scripting feedback without building to the web. Here are some relevant options:

  1. Override Play Mode Setting: Enable the override setting to allow entering Play mode directly. This is particularly useful when you have no need to export or run a local server.
  2. Export Buttons: Utilize the “Build & Deploy” or “Preview Build” buttons in the Needle Engine to efficiently manage your project’s deployment settings. The Preview Build option will also let you see your project in a web context without compiling a local server build while allowing for quick testing (see the documentation) (see the documentation).

Make sure to adjust your settings in the Editor to integrate seamlessly with the Needle Engine. After you click Play, your project should run within the Unity Editor, reflecting changes immediately without needing to build it each time.

If you have any specific issues or errors raised during this process, kindly let me know!

1 replies left - Get a PRO license for more AI replies.
thread_r81u0CbfQHFoPRqtaBSFp597
Reply to this message to continue the conversation

Needle projects are designed to run in the browser. Unity’s scene and game view are not a browser. You can visually edit your scene in Unity, set up meshes, materials, prefabs, set up components and their connections.

In most cases updates to the localhost browser via Needle are faster then entering Play Mode in Unity. The recommended workflow is you have the VS Code workspace open alongside, and edit scripts there, and that hot reloads in the browser, which is way faster than re-building code changes from Unity.

ok, thanks for the response @Felix_Herbst . I learned (from another thread) that Needle doesn’t work with visual scripting, so my need for the in-unity preview is not so helpful anyway. and localhost isn’t helpful because I’m using iFrames, so, CORS issues :slight_smile: I’m drugding through ftp uploads to see my changes. Very slow going, but it’s fine. thanks again for all your help, very much appreciated.

Not quite sure what that means – usually that means part of your setup is incorrect. Would be great if you open a separate forum thread with a bit more info so we can help you!