Header menu logo Nu

StaticModelSurfaceFacetExtensions2 Module

Type extensions

Type extension Description

this.TryGetAlbedoImage

Full Usage: this.TryGetAlbedoImage

Parameters:
Returns: Image AssetTag voption

Attempt to get the currently assigned albedo image, looking it up from metadata when unassigned.

Extended Type: Entity

world : World
Returns: Image AssetTag voption

this.TryGetAlbedoImageAssetName

Full Usage: this.TryGetAlbedoImageAssetName

Parameters:
Returns: string voption
 Attempt to get the currently assigned albedo image asset name, looking it up from metadata when unassigned.
 Useful in editor because oftentimes the only useful identifying information about a static model surface is
 its material assets, particularly its albedo image like so -
 
 for entity in World.getEntities SelectedGroup world do
     match entity.TryGetAlbedoImageAssetName world with
     | ValueSome name when name.Contains "Glass" ->
         entity.SetRenderStyle (Forward (0.0f, 0.0f)) world
     | _ -> ()
 

Extended Type: Entity

world : World
Returns: string voption

Type something to start searching.