-
Notifications
You must be signed in to change notification settings - Fork 55
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
newest pixi-tilemap fails with renderer.plugins.tilemap undefined #124
Comments
Tilemap MUST BE registered before renderer initialisation and requred global PIXI context. You should register render plugin manually before first use like: https://github.com/pixijs/tilemap/blob/master/src/TileRenderer.ts#L201 |
how does one do that on an existing Pixi instance? I dont think I can add it when pixi is initiated |
so, pixi-tilemap is included after renderer is created? renderer.plugins.tilemap = new TileRenderer(renderer); something like that |
I honestly didnt think about this case |
Yes unfortunately because of how the extensions in Gdevelop work, the external library is part of the extension itself |
I can access PIXI's global object in gdevelop, but have no idea how to get to the renderer. this what entry point I have in gdevelop's extension |
honestly, i dont know where Renderer is in GDevelop. |
You can hack the method I think i'll remove TileRenderer completely , make it static, later |
I think it would be better if I get the renderer from gdevelop itself |
@ivanpopelyshev I managed to redister it as a plugin however now there is another problem is this because our version of pixi on GD doesnt have utils? I am confused We do seem to have utils, not sure whats going on |
@ivanpopelyshev I might have discovered a bug.
seems to fix it for me |
here is my wip pr btw 4ian/GDevelop#2828 |
Ok, so, apparantly in UMD build referece to utils might be wrong, i have to check it! Btw, since you are here , tell me, is GDevelop using |
could be a better question for @4ian , but I think YES. I can find many references to it |
@ivanpopelyshev @4ian interestingly its |
Very strange, because bundler link valid https://github.com/pixijs/tilemap/blob/master/dist/pixi-tilemap.umd.js#L17 |
I am currently in the process of upgrading pixi-tilemap on gdevelop and after updating to the newest version of pixi-tilemap, for some reason it no longer gets added to plugins.
it crashes after I do this
https://github.com/blurymind/GDevelop/blob/ldtk-p6/Extensions/TileMap/pixi-tilemap-helper.js#L586
You can test this by changing between the old and the new version of the module.The old one works fine, the new one fails here:
https://github.com/pixijs/tilemap/blob/master/dist/pixi-tilemap.umd.js#L468
and everywhere else, because
renderer.plugins.tilemap is undefined
The text was updated successfully, but these errors were encountered: