Editor Sync not working

hey there! is EditorSync still supposed to be working? for me it isnā€™t, using 4.2.5 and Unity 2022.3.44f :confused:

even with your default template scene i had no luck.

iā€™ve tried clean installs, restarts, disabling auto compression (see below).
i put a few breakpoints in EditorModificationHandler and from what i saw there, it has a connection and sends the changes out but in the browser theyā€™re not applied.

from about a year ago i remember there was a get param like ā€œeditorid=123ā€ but this is missing now. is that correct?

also, i saw a similar post (Editor Sync stopped working) and the changelog entry from the version mentioned there:
Change: EditorSync editor now shows warning if Auto Compress for local development is enabled. With compression the required extensions that are only used for development are stripped and therefore Auto Compress needs to be enabled while using Editor Sync.

it still does not warn me about enabled auto compression though.

Hi krizzl0r!

To address the issue with Editor Sync not working in your project using Needle Engine 4.2.5 with Unity 2022.3.44f, here are several points to consider:

  1. Version Compatibility: Always ensure that your versions of Needle Engine and Unity are compatible. You mentioned using version 4.2.5, so check the changelogs for that version to see if Editor Sync was explicitly addressed.

  2. Auto Compression: The change you referenced indicates that if Auto Compress is enabled, an issue may arise where required extensions are stripped, affecting functionalities like Editor Sync. Make sure Auto Compression is disabled during development.

    • There should be a warning when Auto Compress is enabled, but you mentioned not seeing this. Verify the settings in your project configuration.
  3. Parameters: The parameter editorid=123 you mentioned is currently not present. If itā€™s essential for your implementation, check if thereā€™s a need to alter how information is passed for your version.

  4. Connection Issues: Since youā€™ve seen that EditorModificationHandler can send changes, but they are not applied in the browser, ensure that the local server is functioning correctly. Perform a soft restart of the server to refresh the connection.

  5. Logs and Debugging: Utilize Unityā€™s logs and the connection logs from the Editor Sync package to find more details on whatā€™s potentially going wrong. Log any connection issues or errors.

If these checks donā€™t resolve your issue, please consider sharing any relevant logs or specific debug information from the connection handling. This could greatly assist in pinpointing the problem further!

For your convenience, here are some useful resources:

Let me know how it goes or if there is any other aspect you need help with!

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

Utilize ā€¦ the connection logs from the Editor Sync package

sure, tell me how

Hi krizzl0r!

To access the connection logs from the Editor Sync package in Needle Engine, follow these steps:

  1. Enable Debug Logging:

    • In your Unity project, locate the settings or configuration for the Needle Editor Sync.
    • There should be an option to enable debug or verbose logging related to Editor Sync. This setting might be found in the Inspector window when you select relevant components or the Editor Sync service.
  2. Run the Editor:

    • Start your Unity Editor and make sure that your project is set up for Editor Sync. Open the console (Window > General > Console) to view any debug logs that are generated.
  3. Check the Console:

    • Look for logs related to Editor Sync connections. You should see logs indicating attempts to connect to the browser, sent data, any errors, or other relevant statuses.
  4. Browser Logs:

    • Additionally, open the developer console in your browser (usually by pressing F12), and check the ā€œConsoleā€ and ā€œNetworkā€ tabs. This can help you identify if there are issues on the browser side as well.
  5. Check for Errors:

    • Look specifically for any error messages or warnings that might point to connectivity or configuration problems.

These logs should provide insights into whatā€™s not functioning correctly with Editor Sync. If you find specific error messages or require further clarification on the logs, feel free to share them here!

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

Ok, so there are some compile errors in the current version (2.0.3-beta) of the editor-sync package :confused:
A missing ComponentEvents export from the engine part (even though it seems to be there :person_shrugging: ) and a missing sRGBEncoding export from three (looks like it was renamed).

I manually fixed it to the best of my knowledge and now the editor sync works.

Another gotcha I just experienced: Objects marked as static do not get synced. Totally makes sense but a notification about it would be nice.

But from the looks of it the whole package is kind of abandoned :frowning:

Hi, sorry about that. The package will be fixed soon - Ive created an issue internally.

Regarding static: static objects set matrixAutoUpdate to false. I think this is something EditorSync needs to learn as well. Will add a note to the issue

Hi, the latest alpha bumps the EditorSync package dependency (3.0.0-beta) which fixes the bugs you reported.

1 Like

Hey again, it works now but npm logs those errors (briefly mentioned it in chat last week):

npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: @needle-tools/editor-sync@3.0.0-beta
npm error Found: @needle-tools/engine@4.3.0-alpha.5
npm error node_modules/@needle-tools/engine
npm error   @needle-tools/engine@"^4.3.0-alpha.3" from the root project
npm error
npm error Could not resolve dependency:
npm error peer @needle-tools/engine@"4" from @needle-tools/editor-sync@3.0.0-beta
npm error node_modules/@needle-tools/editor-sync
npm error   dev @needle-tools/editor-sync@"^3.0.0-beta" from the root project
npm error
npm error Conflicting peer dependency: @needle-tools/engine@4.2.5
npm error node_modules/@needle-tools/engine
npm error   peer @needle-tools/engine@"4" from @needle-tools/editor-sync@3.0.0-beta
npm error   node_modules/@needle-tools/editor-sync
npm error     dev @needle-tools/editor-sync@"^3.0.0-beta" from the root project

With the update of editor-sync you set the engine requirement to ā€œ4ā€ so itā€™s only satisfied by stable versions. Which is a bit schizophrenic because your tooling (Unity exporter) happily pushes even -alpha versions to all users, doesnā€™t it? :smiley:

We absolutely dont automatically update to alpha versions! Especially not when youā€™re on a stable version. What can incrementally update behind the scenes is alpha patch version updates (meaning e.g. 4.3.0-alpha.1 may update to 4.3.0-alpha.2 but we never update e.g. 4.2.0 (stable) to any alpha version).

Iā€™ll make a note about the error but itā€™s mostly cosmetic during alpha and should work nonetheless.

Sorry, no not auto-updating, didnā€™t put that clearly. But didnā€™t I land on -alpha.x by a popup asking me to update? Not the same thing as an auto-update of course!

Still, the unresolved dep stops npm from installing. I was just trying to install the camera-controls package and now have to decide if I want to remove the editor-sync package or downgrade to a stable 4.x.x for the installation to go through (or force it via CLI).

Could be better UX-wise, even if it only matters for prerelease versions. If thereā€™s a reason to keep the editor-sync package locked to stable versions thatā€™s fine of course but from my point of view it seems unneccessary. Iā€™ll back off now :wink:

Regarding the popup: I think it only opens the dialogue if youā€™re already on a pre-release version, no?

The issue with alpha and beta and stable semversioning is that rules for updates are more strict - e.g. if the package has a peer dependency to alpha it would complain once the stable or beta version is out even tho nothing has changed. And more loose rules like >= 4.3.0-alpha donā€™t work here.

That being said: Youā€™re right and Iā€™ll bump the peer dependency

Thatā€™d make sense. I think I was on 4.2.5 before but I might mix something up here. Sorry for the confusion. Will report back if Iā€™ll ever see a popup for upgrading from stable to prerelease again.

And thanks for resolving the dependency issue!

Popup pops up, promoting to update from stable to a beta version. If I understood correctly, this is not intended behaviour.

Hi, itā€™s not. I just noticed that beta was not yet handled here and already added it (just canā€™t fix it in already released versions but it wonā€™t happen again in the future). Thanks for the headsup once more