Show / Hide Table of Contents

Method ResolveMocksOnLoad

| Edit this page View Source

ResolveMocksOnLoad(AssetID)

Registers an asset to be instantiated and have its mock references resolved on load.
Must be called before the asset is loaded the first time.
Declaration
public void ResolveMocksOnLoad(AssetID assetID)
Parameters
Type Name Description
AssetID assetID The AssetID of the asset to instantiate and resolve mocks for on load
| Edit this page View Source

ResolveMocksOnLoad(AssetID, Transform)

Registers an asset to be instantiated under the given parent and have its mock references resolved on load.
Must be called before the asset is loaded the first time.
Declaration
public void ResolveMocksOnLoad(AssetID assetID, Transform parent)
Parameters
Type Name Description
AssetID assetID The AssetID of the asset to instantiate and resolve mocks for on load
Transform parent Optional transform under which the asset will be instantiated, otherwise a default container is used
| Edit this page View Source

ResolveMocksOnLoad<T>(SoftReference<T>, Transform, Action<T>)

Registers an asset to be instantiated under the given parent and have its mock references resolved on load.
Must be called before the asset is loaded the first time.
The callback will be invoked when the asset is already resolved and instantiated. Multiple callbacks can be registed for the same asset.
Declaration
public void ResolveMocksOnLoad<T>(SoftReference<T> softReference, Transform parent, Action<T> resolveCallback) where T : UnityEngine.Object
Parameters
Type Name Description
SoftReference<T> softReference The SoftReference<T> to instantiate and resolve mocks for on load
Transform parent Optional transform under which the asset will be instantiated, otherwise a default container is used
Action<T> resolveCallback Adds a callback when the asset was resolved and instantiated
Type Parameters
Name Description
T
| Edit this page View Source

ResolveMocksOnLoad(AssetID, Transform, Action<Object>)

Registers an asset to be instantiated under the given parent and have its mock references resolved on load.
Must be called before the asset is loaded the first time.
The callback will be invoked when the asset is already resolved and instantiated. Multiple callbacks can be registed for the same asset.
Declaration
public void ResolveMocksOnLoad(AssetID assetID, Transform parent, Action<UnityEngine.Object> resolveCallback)
Parameters
Type Name Description
AssetID assetID The AssetID of the asset to instantiate and resolve mocks for on load
Transform parent Optional transform under which the asset will be instantiated, otherwise a default container is used
Action<UnityEngine.Object> resolveCallback Adds a callback when the asset was resolved and instantiated
  • Edit this page
  • View Source
☀
☾
In this article
Back to top
Generated by DocFX
☀
☾