Skip to content

Commit 3d21099

Browse files
Repair/remove broken links
1 parent f93ae62 commit 3d21099

File tree

3 files changed

+10
-18
lines changed

3 files changed

+10
-18
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ The following is a set of guidelines for contributing to Extenject and its packa
3333

3434
:snail: **Websites/forums:**
3535
* [StackOverflow](https://stackoverflow.com/questions/tagged/zenject)
36-
* [Unity Forums](https://forum.unity.com/threads/zenject-dependency-injection-framework-for-unity.201184/)
36+
* [Unity Forums](https://forum.unity.com)
3737

3838
## How Can I Contribute?
3939

@@ -96,7 +96,7 @@ Before creating enhancement suggestions, please check the list of enhancements s
9696

9797
### How Do I Submit A (Good) Pull Request?
9898

99-
Please send a [GitHub Pull Request](https://github.com/svermeulen/Extenject/compare) with a clear list of what you've done (read more about [pull requests](http://help.github.com/pull-requests/)).
99+
Please send a [GitHub Pull Request](https://github.com/svermeulen/Extenject/compare) with a clear list of what you've done (read more about [pull requests](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests)).
100100
When you send a pull request, we will love you forever if you include unit tests.
101101
We can always use more test coverage.
102102

Documentation/WritingAutomatedTests.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
When writing properly loosely coupled code using dependency injection, it is much easier to isolate specific areas of your code base for the purposes of running tests on them without needing to fire up your entire project. This can take the form of user-driven test-beds or fully automated tests using NUnit. Automated tests are especially useful when used with a continuous integration server. This allows you to automatically run the tests whenever new commits are pushed to source control.
55

6-
There are three very basic helper classes included with Zenject that can make it easier to write automated tests for your game. One is for Unit Tests, the other is for Integration Tests, and the third is for Scene Tests. All approaches are run via Unity's built in Test Runner (which also has a command line interface that you can hook up to a continuous integration server). The main differences are that Unit Tests are much smaller in scope and meant for testing a small subset of the classes in your application, whereas Integration Tests can be more expansive and can involve firing up many different systems. And Scene Tests are used to fire up entire scenes and then probe the state of the scene as part of the test.
6+
There are three basic helper classes included with Zenject that can make it easier to write automated tests for your game. One is for Unit Tests, the other is for Integration Tests, and the third is for Scene Tests. All approaches are run via Unity's built in Test Runner (which also has a command line interface that you can hook up to a continuous integration server). The main differences are that Unit Tests are much smaller in scope and meant for testing a small subset of the classes in your application, whereas Integration Tests can be more expansive and can involve firing up many different systems. And Scene Tests are used to fire up entire scenes and then probe the state of the scene as part of the test.
77

88
This is best shown with some examples.
99

@@ -297,7 +297,7 @@ public class SpaceShipTests : ZenjectIntegrationTestFixture
297297

298298
After `PostInstall()` is called, our integration test is injected, so we can define `[Inject]` fields on it like above if we don't want to call `Container.Resolve` for every test.
299299

300-
Note that we can yield our coroutine to test behaviour across time. If you are unfamiliar with how Unity's test runner works (and in particular how 'playmode test' work) please see the [unity documentation](https://docs.unity3d.com/Manual/testing-editortestsrunner.html).
300+
Note that we can yield our coroutine to test behaviour across time. If you are unfamiliar with how Unity's test runner works (and in particular how 'playmode test' work) please see the [unity documentation]()https://docs.unity3d.com/Manual/testing-editortestsrunner.html.
301301

302302
Every zenject integration test is broken up into three phases:
303303

README.md

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -983,7 +983,7 @@ Where:
983983
Container.Bind<Foo>().FromSubContainerResolve().ByInstaller<FooFacadeInstaller>().WithKernel();
984984
```
985985

986-
1. **ByNewContextPrefab** - Initialize subcontainer by instantiating a new prefab. Note that the prefab must contain a `GameObjectContext` component attached to the root game object. For details on `GameObjectContext` see [this section](href="#sub-containers-and-facades").
986+
1. **ByNewContextPrefab** - Initialize subcontainer by instantiating a new prefab. Note that the prefab must contain a `GameObjectContext` component attached to the root game object. For details on `GameObjectContext` see [this section](#sub-containers-and-facades).
987987

988988
```csharp
989989
Container.Bind<Foo>().FromSubContainerResolve().ByNewContextPrefab(MyPrefab);
@@ -1687,9 +1687,9 @@ Then, when you start any scene that contains a `SceneContext`, your `ProjectCont
16871687

16881688
Note also that this only occurs once. If you load another scene from the first scene, your `ProjectContext` will not be called again and the bindings that it added previously will persist into the new scene. You can declare `ITickable` / `IInitializable` / `IDisposable` objects in your project context installers in the same way you do for your scene installers with the result being that `IInitializable.Initialize` is called only once across each play session and `IDisposable.Dispose` is only called once the application is fully stopped.
16891689

1690-
The reason that all the bindings you add to a global installer are available for any classes within each individual scene, is because the Container in each scene uses the `ProjectContext` Container as it's "parent". For more information on nested containers see [here](href="#sub-containers-and-facades").
1690+
The reason that all the bindings you add to a global installer are available for any classes within each individual scene, is because the Container in each scene uses the `ProjectContext` Container as it's "parent". For more information on nested containers see [here](#sub-containers-and-facades).
16911691

1692-
`ProjectContext` is a very convenient place to put objects that you want to persist across scenes. However, the fact that it's completely global to every scene can lead to some unintended behaviour. For example, this means that even if you write a simple test scene that uses Zenject, it will load the `ProjectContext,` which may not be what you want. To address these problems it is often better to use Scene Parenting instead, since that approach allows you to be selective in terms of which scenes inherit the same common bindings. See [here](href="#scene-parenting") for more details on that approach.
1692+
`ProjectContext` is a very convenient place to put objects that you want to persist across scenes. However, the fact that it's completely global to every scene can lead to some unintended behaviour. For example, this means that even if you write a simple test scene that uses Zenject, it will load the `ProjectContext,` which may not be what you want. To address these problems it is often better to use Scene Parenting instead, since that approach allows you to be selective in terms of which scenes inherit the same common bindings. See [here](#scene-parenting) for more details on that approach.
16931693

16941694
Note also that by default, any game objects that are instantiated inside ProjectContext will be parented underneath it by default. If you'd prefer that each newly instantiated object is instead placed at the root of the scene hierarchy (but still marked DontDestroyOnLoad) then you can change this by unchecking the flag 'Parent New Objects Under Context' in the inspector of ProjectContext.
16951695

@@ -1908,11 +1908,11 @@ There are also settings for the signals system which are documented [here](#sett
19081908

19091909
See [here](href="Documentation/Signals.md").
19101910

1911-
## <a id="creating-objects-dynamically"></a>Creating Objects Dynamically Using Factories
1911+
## Creating Objects Dynamically Using Factories
19121912

19131913
See [here](href="Documentation/Factories.md").
19141914

1915-
## <a id="memory-pools"></a>Memory Pools
1915+
## Memory Pools
19161916

19171917
See [here](href="Documentation/MemoryPools.md").
19181918

@@ -3321,18 +3321,15 @@ It is possible to remove or replace bindings that were added in a previous bind
33213321
* Pokemon Go (both [iOS](https://itunes.apple.com/us/app/pokemon-go/id1094591345?mt=8) and [Android](https://play.google.com/store/apps/details?id=com.nianticlabs.pokemongo&hl=en))
33223322
* [Zenject Hero](https://github.com/Mathijs-Bakker/Zenject-Hero) - Remake of the classic Atari game H.E.R.O. Includes complete source.
33233323
* [Viveport VR](https://www.youtube.com/watch?v=PfBQGtdHH7c)
3324-
* [Spinball Carnival](https://play.google.com/store/apps/details?id=com.nerdcorps.pinballcritters&hl=en) (Android)
33253324
* [Slugterra: Guardian Force](https://play.google.com/store/apps/details?id=com.nerdcorps.slugthree&hl=en) (Android)
33263325
* [Submarine](https://github.com/shiwano/submarine) (iOS and Android)
33273326
* [Space Shooter Alpha](https://misfitlabs.itch.io/space-shooter) (Android) (Extenject)
33283327
* [NOVA Black Holes](https://itunes.apple.com/us/app/nova-black-holes/id1114574985?mt=8) (iOS)
33293328
* [Farm Away!](http://www.farmawaygame.com/) (iOS and Android)
33303329
* [Build Away!](http://www.buildawaygame.com/) (iOS and Android)
33313330
* Stick Soccer 2 ([iOS](https://itunes.apple.com/gb/app/stick-soccer-2/id1104214157?mt=8) and [Android](https://play.google.com/store/apps/details?id=com.sticksports.soccer2&hl=en_GB))
3332-
* [Untethered](https://play.google.com/store/apps/details?id=com.numinousgames.Untethered&hl=en) (Google VR)
33333331
* [Toy Clash](https://toyclash.com/) - ([GearVR](https://www.oculus.com/experiences/gear-vr/1407846952568081/))
33343332
* [Bedtime Math App](http://bedtimemath.org/apps) - ([iOS](https://itunes.apple.com/us/app/bedtimemath/id637910701) and [Android](https://play.google.com/store/apps/details?id=com.twofours.bedtimemath))
3335-
* [4 Pics 1 Word: John Einstein](https://play.google.com/store/apps/details?id=com.qantanstudio.impossiblequiz) (Android) - Puzzle game
33363333
* [EcsRx Roguelike 2D](https://github.com/grofit/ecsrx.roguelike2d) - An example of a Roguelike 2d game using EcsRx and Zenject
33373334
* [Golfriends](https://www.airconsole.com/#!play=com.octopusgames.golfriends) (WebGL) - Mini golf game using a combination of WebGL and mobile
33383335
* Word Winner ([iOS](https://itunes.apple.com/us/app/id1404769349) and [Android](https://play.google.com/store/apps/details?id=com.SmoreGames.WordWinner)) - A Word Brain Game
@@ -3344,16 +3341,11 @@ It is possible to remove or replace bindings that were added in a previous bind
33443341
* [View Controller](http://blog.jamjardavies.co.uk/index.php/2016/04/12/view-controller-with-zenject/) - A view controller system
33453342
* [Alensia](https://github.com/mysticfall/Alensia) - High level framework to build RPG style games using Unity
33463343
3347-
Tools
3348-
3349-
* [Modest 3D](http://www.modest3d.com/editor) (WebGL, WebPlayer, PC) - An IDE to allow users to quickly and easily create procedural training content
3350-
* [Modest 3D Explorer](http://www.modest3d.com/explorer) (WebGL, WebPlayer, iOS, Android, PC, Windows Store) - A simple editor to quickly create a 3D presentation with some number of slides
3351-
33523344
* **<a id="circular-dependency-error"></a>I keep getting errors complaining about circular reference! How to address this?**
33533345

33543346
If two classes are injected into each other and both classes use contructor injection, then obviously it is not possible for zenject to create both of these classes. However, what you can do instead is switch to use method injection or field/property injection instead. Or, alternatively, you could use the [LazyInject<>](#just-in-time-resolve) construct.
33553347

3356-
## <a id="cheatsheet"></a>Cheat Sheet
3348+
## Cheat Sheet
33573349

33583350
See [here](href="Documentation/CheatSheet.md").
33593351

0 commit comments

Comments
 (0)