Skip to content
This repository has been archived by the owner on Jul 5, 2022. It is now read-only.

Prefab Inclusion #51

Closed
B3L7 opened this issue Jan 29, 2017 · 3 comments
Closed

Prefab Inclusion #51

B3L7 opened this issue Jan 29, 2017 · 3 comments

Comments

@B3L7
Copy link

B3L7 commented Jan 29, 2017

It's stated that generated states are included in main.js but I see nothing about prefabs. When I try and call a generated prefab it errors as undefined. Do I need to include my prefabs manually and if so what is the best way so that they will end up in the final build. Thanks!

@julien
Copy link
Owner

julien commented Jan 29, 2017

Hey @B3L7,

Did you try running

yo phaser:prefab

You should see something like this

$ yo phaser:prefab
Creating a new Phaser Prefab.
? What type of prefab would you like to create? (Use arrow keys)
❯ prefabSprite 
  prefabGroup 
  prefabTileSprite 
  prefabEmitter 
  prefabText

@B3L7
Copy link
Author

B3L7 commented Jan 29, 2017

Got it. Took a look at your example game and found I had to import the prefab directly into the state. Thanks for the great work!

@B3L7 B3L7 closed this as completed Jan 29, 2017
@julien
Copy link
Owner

julien commented Jan 29, 2017

Thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants