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

Fix/add namepace to code templates #58

Conversation

jeffcampbellmakesgames
Copy link
Contributor

Summary

This PR updates the templates used for code generation to include the ScriptableObjectArchitecture namespace to help reduce the number of immediate errors when generating code via this way. It also fixes a small bug where the template for ClampedVariable still included a second generic argument for a Variable type (recently removed as unused).

Testing

To test this, try generating code for all supported types for an arbitrary class without a namespace like so:

[Serializable]
public  class Foo
{
}

When code is generated, this should result in fewer less errors as all of the ScriptableObjectArchitecture types will now be in the correct namespace and not require additional using statements or manual efforts to correct this.

Changes

Modified code generation window

  • Marked inline initialized arrays as readonly
  • Removed redundant call to static EditorWindow method as SO_CodeGenerationWindow is of type EditorWindow; simplified method call.

Updated code generation templates

  • Updated code generation templates to include ScriptableObjectArchitecture namespace
  • Updated ClampedVariable template to not include the second generic type value for IClampedVariable since that no longer exists.

jzapdot added 2 commits April 17, 2019 09:58
* Marked inline initialized arrays as readonly
* Removed redundant call to static EditorWindow method as SO_CodeGenerationWindow is of type EditorWindow; simplified method call.
* Updated code generation templates to include ScriptableObjectArchitecture namespace
* Updated ClampedVariable template to not include the second generic type value for IClampedVariable since that no longer exists.
@DanielEverland DanielEverland added this to the Release 1.6.0 milestone Apr 18, 2019
@DanielEverland DanielEverland merged commit 3a805b7 into DanielEverland:master Apr 18, 2019
@jeffcampbellmakesgames jeffcampbellmakesgames deleted the fix/add_namepace_to_code_templates branch April 18, 2019 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants