Skip to main content

Basics

In most cases, the class that you want to subclass is TilePlusBase. But you might want to extend from one of the supplied tiles like TpFlexAnimatedTile. Many TilePlus Tiles’ fields, properties, and methods are marked as ‘virtual’ so they can easily be overridden.

When creating subclasses of TilePlus tiles you should specify a namespace. Use Tools/TilePlus/Configuration Editor and add your namespace to the Namespaces field. Then click the Reload button. Namespaces are required for derived TilePlus classes. If the namespace isn’t added to the system via the Configuration Editor, then the Selection and Brush inspectors will not display any fields or properties that you’ve decorated with TilePlus attributes.

Many of the properties in the sections demarked by #if UNITY_EDITOR are things that you can ignore. If you want fields or properties to display in the Tile+Brush Inspector, you can use attributes to display them. The TilePlusBase property “Description” can be used to show some text information about your tile in the Tile+Brush inspector.

It’s helpful to examine the ITilePlus interface as it’s not cluttered up with code, tooltips, attributes, conditional compilation directives, and so on.