Using Asset Data

Examples
Setting an icon for an interaction:
Setting up tests:
Creating a world space loading bar
Last updated
Was this helpful?

Last updated
Was this helpful?
Was this helpful?
// The Icon field is a Sprite field.
// The InteractionIcons.Open is not a Sprite, it is an AssetDatabase.
// There are implicit operators to cast this AssetDatabase into a Sprite.
public override Sprite GetIcon(InteractionEvent interactionEvent)
{
return Icon != null ? Icon : InteractionIcons.Open;
}// Get local player position,
// interaction controller and put bikehorn in first hand available.
// Note that we are adding a PDA manually for the test.
AttachedContainer hand =
TestHelpers.LocalPlayerSpawnItemInFirstHandAvailable(Items.PDA);// Calling the New() method simply creates an instance for that object.
_loadingBarInstance = WorldSpaceUI.LoadingBar.New();