TilePlus Version 5
Unity3D Tilemap Extension
Loading...
Searching...
No Matches
TilePlus.IActionPlugin Interface Reference

Used with ZoneActions and EventActions to provide a way to have a second asset (typ, a Scriptable Obj but can be any UnityEngine.Object) be inspectable thru the IMGUI tile editor (selection inspector). Note that the asset ought to be a PROJECT asset and NOT a SCENE object, although this is not enforced or checked. More...

Inheritance diagram for TilePlus.IActionPlugin:

Properties

ScriptableObject? InspectableObject [get]
 A sub-object, if any.

Detailed Description

Used with ZoneActions and EventActions to provide a way to have a second asset (typ, a Scriptable Obj but can be any UnityEngine.Object) be inspectable thru the IMGUI tile editor (selection inspector). Note that the asset ought to be a PROJECT asset and NOT a SCENE object, although this is not enforced or checked.

For example, a TpTweenSpec could be used for the inspectable object.

Property Documentation

◆ InspectableObject

ScriptableObject? TilePlus.IActionPlugin.InspectableObject
get

A sub-object, if any.

remarks>if non-null, the object field in the SelectionInspector will have an additonal button to open this in a popup inspector. It can be used for any SCRIPTABLE OBJECT (PROJECT ASSET) that this EventAction might need.

It may seem as if this isn't actually read-from anywhere, but it's value is obtained via reflection in the ImGuiTileEditor. In a tile asset you'll use the 'TptShowObjectField' Attribute with the hasSubObject param = true. The additional param is used rather than testing for this infrequently-used(?) property via reflection thru the interface on every pass unless its really needed.


The documentation for this interface was generated from the following file:
  • /Users/jms/Documents/Tpt_55/TPT55/Assets/Plugins/TilePlus/Runtime/Interface/IActionPlugin.cs