getOrPut

fun getOrPut(path: ResourcePath, createModel: () -> Model): Model

Retrieves the Model registered under the given path or creates a model using createModel, registers it under the given path and returns it.


fun getOrPut(model: Model, createPath: () -> ResourcePath): ResourcePath

Retrieves the first ResourcePath the given model is registered under or creates a new ResourcePath using createPath, registers it under the given model and returns it.