Skip to content

Commit

Permalink
Minor typos in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
svermeulen committed Feb 1, 2016
1 parent 6200645 commit a008c32
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1216,11 +1216,15 @@ You can do this in Zenject out-of-the-box by executing the menu item `Edit -> Ze

Note that if you want to use this feature (which I recommend as its very useful) then you should avoid instantiating new objects in your installers and executing other code that has similar side effects.

Also, if you happen to be a fan of automated testing (as I am) then you can include calls to this menu item in unity batch mode as part of your testing suite. For example, to validate the scenes in the sample project from the command line, you can just execute this:
Also, if you happen to be a fan of automated testing (as I am) then you can include calls to this menu item in unity batch mode as part of your testing suite. For example:

"[PATH TO UNITY]" -projectPath "[PATH TO SAMPLE PROJECT]" -executeMethod Zenject.ZenEditorUtil.ValidateAllScenesFromScript -batchmode -nographics

You can also validate specific scenes from the command line by calling ValidateScenesFromScript and also passing a list of scenes:

"[PATH TO UNITY]" -projectPath "[PATH TO SAMPLE PROJECT]" -executeMethod Zenject.ZenEditorUtil.ValidateScenesFromScript -batchmode -nographics "-CustomArg:scenes=Asteroids,AsteroidsDecoratorExample"

This will return an error code if validation fails. If it succeeded, it will return 0 and the log for the unity editor will contain the line "Successfully validated all 2 scenes".
This will both return an error code if validation fails. If it succeeded, it will return 0 and the log for the unity editor will contain the line "Successfully validated all 2 scenes".

## <a id="using-the-unity-inspector-to-configure-settings"></a>Using the Unity Inspector To Configure Settings

Expand Down Expand Up @@ -2529,7 +2533,7 @@ However, this approach will not allow you to take advantage of the advanced feat

* **<a id="aot-support"></a>Does this work on AOT platforms such as iOS and WebGL?**

Yes. However, there are a few things that you should be aware of for WebGL. One of the things that Unity's IL2CPP compiler does is strip out any code that is not used. It calculates what code is used by statically analyzing the code to find usage. This is great, except that this will miss any methods/types that are not used explicitly. In particular, any classes that are created solely through Zenject will have their constructors ignored by the IL2CPP compiler. In order to address this, the [Inject] attribute that is sometimes applied to constructors also serves to automatically mark the constructor to IL2CPP to not strip out. In other words, to fix this issue all you have to do is mark every constructor that you create through Zenject with an [Inject] attribute when compiling for WebGL.
Yes. However, there are a few things that you should be aware. One of the things that Unity's IL2CPP compiler does is strip out any code that is not used. It calculates what code is used by statically analyzing the code to find usage. This is great, except that this will miss any methods/types that are not used explicitly. In particular, any classes that are created solely through Zenject will have their constructors ignored by the IL2CPP compiler. In order to address this, the [Inject] attribute that is sometimes applied to constructors also serves to automatically mark the constructor to IL2CPP to not strip out. In other words, to fix this issue all you have to do is mark every constructor that you create through Zenject with an [Inject] attribute when compiling for WebGL / iOS.

* **<a id="faq-performance"></a>How is performance?**

Expand Down

0 comments on commit a008c32

Please sign in to comment.