Public Member Functions | Protected Member Functions | List of all members
AssetAddressPropertyDrawer Class Referenceabstract

Detailed Description

A Unity Editor PropertyDrawer for AssetAddresses.

This should be subclassed in your project to define what the PropertyDrawer should use for the 'asset name' field. Whichever you mark as 'official' in your project needs [CustomPropertyDrawer(typeof(AssetAddress))]

This version stores the asset GUID for the 'asset name', but that's not actually supported by Unity by default.

Inheritance diagram for AssetAddressPropertyDrawer:

Public Member Functions

override void  OnGUI (Rect position, SerializedProperty property, GUIContent label)

Protected Member Functions

abstract string  GetContentPathFor (AssetAddress addy)
abstract AssetAddress  AddressForContent (Object @object)

Member Function Documentation

◆ AddressForContent()

abstract AssetAddress AddressForContent ( Object @  object )
protectedpure virtual

Given an asset in Editor, make an AssetAddress out of it.

Resulting address

Implemented in AssetAddressPropertyDrawer_GUID.

◆ GetContentPathFor()

abstract string GetContentPathFor ( AssetAddress  addy )
protectedpure virtual

Given an address, get the path to the asset in Editor.

path or null if not found

Implemented in AssetAddressPropertyDrawer_GUID.