Methods
// define on the object type
object.funny = def() -> (
return "FUNNY"
)
// call the method on an object
log {}.funny()
// FUNNYLast updated
In OSL you can define custom methods on specific types.
// define on the object type
object.funny = def() -> (
return "FUNNY"
)
// call the method on an object
log {}.funny()
// FUNNYInside a custom method, self is the value the method was called on.
Custom methods work with object, array, number, boolean and string values.
Last updated