How do I make changes to components?
See original GitHub issueHow do I make changes to components? I had a component and I wanted to change it:
public sealed class ViewComponent : IComponent { public GameObject gameObject; }
to
public sealed class ViewComponent : IComponent { public Transform tr; }
But I got a lot of compiler errors, although I fixed the code of all the systems. I also tried to remove the generated code and generate it again, but without success
How to correctly change the members of a component?
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Edit main components
From there, you can apply any changes you want to the main component. Select an instance in the current file. Open the Design...
Read more >How to edit components in Figma
If you want to edit a certain component, just go to the root component frame and edit it. Any change you add, Figma...
Read more >How Do I Edit an Instance of a Component in Figma?
To edit an instance of a component, simply select it and make your changes. When you edit a component, any changes you make...
Read more >How Do You Edit a Component in Figma?
In the right sidebar, click on the “Edit component” button (it looks like a pencil). 3. Make your changes in the component editor....
Read more >How to edit components in Figma
Right-Click on your instance and select Go to the main component · Now, add your changes to the component. · Go to the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

In my project I have been using some defines that I can set to disable all my Entitas code when making changes to components or systems.
It is a bit of extra work, but has has helped with refactoring and Entitas upgrades. I disable Systems while refactoring Components. Then after I regenerate the new components, I can enable systems again. It seemed a bit nicer than moving code in and out of the project.
And also one for systems.
I added those defines to my Entitas source file templates to keep it easy.
Upcoming changes to the code generator will likely improve this in future, but for now, here is the process I use when i change my components (e.g. renames, new fields, deletions etc).
You may have compile errors at this point, caused by your component changes, but they won’t be in generated code, they’ll be in your systems code which you are now free to go and fix.
Between each of these steps make sure you allow Unity to compile. The code generator will not run with compile errors present or during Untiy compilation.