Protected Member Functions | List of all members
AssetAddressPropertyDrawer_GUID Class Reference

Detailed Description

A Unity Editor PropertyDrawer for AssetAddresses using GUIDs for Asset names.

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_GUID:
AssetAddressPropertyDrawer

Protected Member Functions

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

Additional Inherited Members

- Public Member Functions inherited from AssetAddressPropertyDrawer
override void  OnGUI (Rect position, SerializedProperty property, GUIContent label)
 

Member Function Documentation

◆ AddressForContent()

override AssetAddress AddressForContent ( Object @  object )
inlineprotectedvirtual

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

Parameters
object
Returns
Resulting address

Implements AssetAddressPropertyDrawer.

◆ GetContentPathFor()

override string GetContentPathFor ( AssetAddress  addy )
inlineprotectedvirtual

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

Parameters
addy
Returns
path or null if not found

Implements AssetAddressPropertyDrawer.