Skip to content

Workflow improvement - Delete Bindings #53

Open
@AustinSmith13

Description

@AustinSmith13

The Issue

When you create a new Abstract type for example AbstractBaseBallScript and you generate the bindings you get BaseBallScript In your Bindings.cs. Switching back to unity editor triggers a compilation and no errors. Good.

If you add some more abstract functions to your AbstractBaseBallScript and switch back to unity editor to re-build your bindings. Unity Editor will have some Errors for you, but this does not prevent you from clicking on Generate Bindings. If you do generate bindings again GenerateBindings is accessing an older assembly without your changes to AbstractBaseBallScript. Thus Bindings.cs will not have your new changes and will continue to give compilation errors.

The only way to fix this is to manually clear out your Bindings.cs , compile your code with no errors, then click Generate Bindings. This results with bindings that reflect your changes.

One Potential Fix

The way I have fixed this currently is by adding a new editor option NativeScript/Delete Bindings. I call InjectBuilders and have them clear out the bindings for me. Now I can delete the bindings and compile without errors. One problem that still persists is you still have to fix any other errors from referencing the bindings generated class from your code-base. In my case its just a factory function.

I'm not sure if this is an already solved problem. I would like to know what your thoughts are on this.

If you think the Delete Bindings is a good idea I can create another pull request as well.

Metadata

Metadata

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions