Rotorz Tile System Icon
Rotorz Tile System for Unity
API Reference
Available on the Unity Asset Store
TOC

Current Property

Gets or sets the current factory for creating and destroying tile game objects at runtime.
public static IObjectFactory Current { get; set; }
public static function get Current() : IObjectFactory
public static function set Current(value : IObjectFactory)

Property Value

Examples

Activating a custom object factory:

public class CustomObjectFactory : MonoBehaviour, IObjectFactory {
    // Implement IObjectFactory here...

    void Awake() {
        // Activate the object factory asap!
        DefaultRuntimeObjectFactory.Current = this;
    }
}
class CustomObjectFactory extends MonoBehaviour implements IObjectFactory {
    // Implement IObjectFactory here...

    function Awake() {
        // Activate the object factory asap!
        DefaultRuntimeObjectFactory.Current = this;
    }
}

See Also

Reference