◆ SetUp()
override void Goo.Tests.Editor.Pooling.ExtendedObjectPoolerTests.SetUp |
( |
| ) |
|
|
inlinevirtual |
Implements Goo.Tests.Editor.Pooling.PoolingObjectsTests< ExtendedTestablePooler >.
22 {
23 _prefab =
new GameObject(
"TestName");
25 .Set(
"_prefab", p => p.objectReferenceValue =
_prefab)
26 .Apply()
27 .RunInEditor()
28 .Get();
29 }
TPooler _pooler
Definition: PoolingObjectsTests.cs:25
GameObject _prefab
Definition: PoolingObjectsTests.cs:26
Definition: MonoBehaviourInitializer.cs:9
static MonoBehaviourInitializer< T > Instantiate(string name=null)
Definition: MonoBehaviourInitializer.cs:44
◆ GetObject_WithoutIPooled()
void Goo.Tests.Editor.Pooling.ExtendedObjectPoolerTests.GetObject_WithoutIPooled |
( |
| ) |
|
|
inline |
33 {
36 Assert.IsNotNull(pooled);
38 Assert.IsTrue(obj.activeSelf);
39 }
◆ GetObject_WithPooledComponent()
void Goo.Tests.Editor.Pooling.ExtendedObjectPoolerTests.GetObject_WithPooledComponent |
( |
| ) |
|
|
inline |
43 {
47 Assert.IsNotNull(pooled);
49 Assert.IsTrue(obj.activeSelf);
50 }
◆ GetObject_WithCustomIPooled()
void Goo.Tests.Editor.Pooling.ExtendedObjectPoolerTests.GetObject_WithCustomIPooled |
( |
| ) |
|
|
inline |
54 {
55 _prefab.AddComponent<CustomPooled>();
58 Assert.IsNotNull(pooled);
60 Assert.IsTrue(obj.activeSelf);
61 }
◆ GetObject_ReusabilityOfIPooledBehaviour()
void Goo.Tests.Editor.Pooling.ExtendedObjectPoolerTests.GetObject_ReusabilityOfIPooledBehaviour |
( |
| ) |
|
|
inline |
65 {
66 _prefab.AddComponent<CustomPooled>();
67 var first =
_pooler.GetObject();
68 CustomPooled pooled1 = first.GetComponent<CustomPooled>();
69 pooled1.DeactivateAndFree();
70 var second =
_pooler.GetObject();
72 Assert.AreSame(first, second);
73 Assert.AreSame(pooled1, pooled2);
75 }
◆ FreeObject()
override void Goo.Tests.Editor.Pooling.ExtendedObjectPoolerTests.FreeObject |
( |
GameObject |
item | ) |
|
|
inlineprotectedvirtual |
The documentation for this class was generated from the following file: