Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error opening Text section in Inspector view #42

Closed
PhaserEditor2D opened this issue Jun 18, 2020 · 3 comments
Closed

Error opening Text section in Inspector view #42

PhaserEditor2D opened this issue Jun 18, 2020 · 3 comments
Labels
Bug Something isn't working

Comments

@PhaserEditor2D
Copy link
Owner

PhaserEditor2D commented Jun 18, 2020

(reported by a client)

I’m having trouble using the scene editor in the new Phaser Editor 2D v3.2.0 to edit the styles applied to a standard text object. Though I can edit the content through the Text Content inspector, the Text inspector does not show up (see attached image). The inspector I’m referring to is shown here: https://help.phasereditor2d.com/v3/scene-editor/text-object.html. As a workaround, editing the associated .scene json file to add text style does work and is rendered appropriately in-editor and in-game.

This can be replicated by:

  • Run v3.2.0’s server on Windows 10 1909
  • Open webapp in Chromium 83.0.4103.97 (This also occurs in Firefox 77.0.1)
  • Create new project from the Basic Javascript template
  • Open Level.scene
  • From right click menu, add new text object

I noticed a few errors in my Javascript console which I pasted here: https://gist.github.com/drfuzzyness/1e2a9d597374b39f5aefbe6043ce5d87

Update: This seems to be caused by the --enable-advanced-js-editor command line flag. Removing this restores the intended functionality.

image

@PhaserEditor2D PhaserEditor2D added Bug Something isn't working blocking labels Jun 18, 2020
@PhaserEditor2D
Copy link
Owner Author

PhaserEditor2D commented Jun 18, 2020

I cannot reproduce this error. Maybe it is related with the order the resources are fetched.

The problem is that the Phaser docs file (plugins/phasereditor2d.scene/data/phaser-docs.json) is not loaded at the right moment.

Please, replace the file:
PhaserEditor2D/editor/plugins/phasereditor2d.ide/_out/phasereditor2d.ide.js with this version I attach here:

phasereditor2d.ide.zip

(Check you clear the browser cache)

It should prints some debug messages like this:

assert _data = object
phasereditor2d.ide.js?v=3.2.0:246 getDoc(Phaser.Types.GameObjects.Text.TextStyle.fixedHeight)
phasereditor2d.ide.js?v=3.2.0:247 assert _data = object
phasereditor2d.ide.js?v=3.2.0:246 getDoc(Phaser.GameObjects.Text.setPadding)
phasereditor2d.ide.js?v=3.2.0:247 assert _data = object
phasereditor2d.ide.js?v=3.2.0:246 getDoc(Phaser.GameObjects.TextStyle.baselineX)
phasereditor2d.ide.js?v=3.2.0:247 assert _data = object
phasereditor2d.ide.js?v=3.2.0:246 getDoc(Phaser.GameObjects.TextStyle.baselineY)
phasereditor2d.ide.js?v=3.2.0:247 assert _data = object
phasereditor2d.ide.js?v=3.2.0:246 getDoc(Phaser.GameObjects.Text.lineSpacing)
phasereditor2d.ide.js?v=3.2.0:247 assert _data = object
phasereditor2d.ide.js?v=3.2.0:246 getDoc(Phaser.GameObjects.Text.setMaxLines)
phasereditor2d.ide.js?v=3.2.0:247 assert _data = object

Please, try to reproduce the error again and send me your console log. All the log, from the start to the end.

Thanks.

@drfuzzyness
Copy link

drfuzzyness commented Jun 19, 2020

It'll be a few days before I can get back to the original affected computer I previously tested on. I've tried on a fresh Windows 10 1909 machine that never had PhaserEditor2D installed and using --enable-advanced-js-editor didn't replicate the bug with either the original or the new phasereditor2d.ide.js.

I have a hunch that the affected Windows machine I tested on may have had some strange asset caching going on, although using a private browsing window didn't help on the affected machine.

I'll report back when I can test on the affected machine again, but a fresh install of 3.2.0 on a fresh computer works fine.

@PhaserEditor2D
Copy link
Owner Author

Hi @drfuzzyness

I am glad it is working to you now. I will keep this issue open for a while. I think it was probably a problem with caching or a missing file. Thanks for the help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants