|
Unity Tile Properties 1.0
A dynamic and editor-friendly metadata system for 2D tilemap tiles in Unity 6.
|
Singleton object that keeps track of every tile property list in the game and passes property info to other objects. More...
Public Member Functions | |
| bool | AreListsNull () |
| Returns true or false if there have been any tile property lists assigned to this object or not. | |
| bool | DoesTileExistWithProperty (TileBase tile, ref TilePropertiesList included_list, bool throw_on_property_find=true) |
| Takes a reference to a tile, and checks if it has been assigned to any tile property list. | |
| bool | DoesTilePropertyListExist (string list_name, ref TilePropertiesList included_list, bool throw_on_list_find=true) |
| Takes a reference to a name of a tile property list, and checks if it exists in the project somewhere. | |
| TileBase | GetAffectedTile (string property_list_name, int index) |
| Returns a 'TileBase' object reference to a tile that is affected by a specific tile property list. | |
| List< TileBase > | GetAllAffectedTiles (string property_list_name) |
| Returns a list of all 'TileBase' objects affected by a specific tile property list. | |
| void | SetAffectedTile (TileBase tile, string property_list_name, int index) |
| Sets the value of a specific 'TileBase' object reference in the list of affected tiles for a specific tile property list. | |
| void | AddAffectedTile (TileBase new_tile, string property_list_name) |
| Add a new 'TileBase' object reference to the list of affected tiles for a specific tile property list. | |
| void | RemoveAffectedTile (TileBase old_tile, string property_list_name) |
| Removes a reference to a 'TileBase' object, with the same name as 'new_tile', in a specific tile property list. | |
| void | RemoveAffectedTile (int index, string property_list_name) |
| Removes a reference to a 'TileBase' object, at position 'index', in a specific tile property list. | |
| void | ClearAllAffectedTiles (string property_list_name) |
| Clears all references to 'TileBase' objects inside of a specific tile property list. | |
| object | GetTileProperty (TileBase tile, string property_name, Type property_type, bool throw_on_tile_find=false, bool throw_on_property_find=false) |
| Returns the generic unboxed value of a tile property variable, based on a reference to a tile object. | |
| object | GetTileProperty (string property_list_name, string property_name, Type property_type, bool throw_on_list_find=false, bool throw_on_property_find=false) |
| Returns the generic unboxed value of a tile property variable, based on a reference to a tile property list's name. | |
| void | SetTileProperty (TileBase tile, string property_name, object new_value, bool throw_on_tile_find=false, bool throw_on_property_find=false) |
| Sets the value of a tile property variable, based on a reference to a tile object. | |
| void | SetTileProperty (string property_list_name, string property_name, object new_value, bool throw_on_list_find=false, bool throw_on_property_find=false) |
| Sets the value of a tile property variable, based on a reference to a tile property list's name. | |
| void | AddTileProperty (string property_list_name, string new_property_name, object new_property_value, bool throw_on_list_find=false) |
| Add a new tile property variable to a specific tile property list. | |
| void | RemoveTileProperty (TileBase tile, string property_name, bool throw_on_tile_find=false, bool throw_on_property_find=false) |
| Removes a tile property from a specific tile object. | |
| void | RemoveTileProperty (string property_list_name, string property_name, bool throw_on_list_find=false, bool throw_on_property_find=false) |
| Removes a tile property from a specific tile property list reference. | |
| void | ClearTileProperties (TileBase tile) |
| Takes a reference for a tile object, and removes all tile properties assigned to it. | |
| void | ClearTileProperties (string property_list_name) |
| Takes a reference for a tile property list's name, and removes all properties assigned to that list. | |
Data Fields | |
| List< TilePropertiesList > | TilePropertyLists = new() |
Properties | |
| static TilePropertiesManager | Instance [get] |
| Singleton instance of the manager object. | |
Singleton object that keeps track of every tile property list in the game and passes property info to other objects.
This is where most tile-property-related activity happens during runtime, and where you can find essential getters and setters to access Tile Property Lists. This can be given its own object or attached to an already-existing tilemap object in the scene.
|
inline |
Add a new 'TileBase' object reference to the list of affected tiles for a specific tile property list.
| new_tile | A soon-to-be added tile object reference from a Tilemap. |
| property_list_name | The name of a 'TilePropertiesList' ScriptableObject in the Editor. |
|
inline |
Add a new tile property variable to a specific tile property list.
| property_list_name | The name of a 'TilePropertiesList' ScriptableObject in the Editor. |
| new_property_name | The string name of the soon-to-be added tile property. |
| new_property_value | The object value that will be stored in the soon-to-be added property. |
| throw_on_list_find | Should this throw an error log if no list can be found with this name? |
|
inline |
Returns true or false if there have been any tile property lists assigned to this object or not.
|
inline |
Clears all references to 'TileBase' objects inside of a specific tile property list.
| property_list_name | The name of a 'TilePropertiesList' ScriptableObject in the Editor. |
|
inline |
Takes a reference for a tile property list's name, and removes all properties assigned to that list.
| property_list_name | The name of a 'TilePropertiesList' ScriptableObject in the Editor. |
|
inline |
Takes a reference for a tile object, and removes all tile properties assigned to it.
| tile | The tile object reference from a Tilemap. |
|
inline |
Takes a reference to a tile, and checks if it has been assigned to any tile property list.
See also:
| tile | The tile object reference to check for. |
| included_list | The property list that the tile has been assigned to, if any are found. |
| throw_on_property_find | Should this throw an error log if no associated list can be found for this tile? |
|
inline |
Takes a reference to a name of a tile property list, and checks if it exists in the project somewhere.
See also:
| list_name | The name of the property list to check for. |
| included_list | The property list that the tile has been assigned to, if any are found. |
| throw_on_list_find | Should this throw an error log if no list can be found of this name? |
|
inline |
Returns a 'TileBase' object reference to a tile that is affected by a specific tile property list.
See also:
| property_list_name | The name of a 'TilePropertiesList' ScriptableObject in the Editor. |
| index | The list index for the requested tile. |
|
inline |
Returns a list of all 'TileBase' objects affected by a specific tile property list.
| property_list_name | The name of a 'TilePropertiesList' ScriptableObject in the Editor. |
|
inline |
Returns the generic unboxed value of a tile property variable, based on a reference to a tile property list's name.
| property_list_name | The name of a 'TilePropertiesList' ScriptableObject in the Editor. |
| property_name | The name of the property to search the current property list for. |
| property_type | The variable type of the property to search the property list(s) for. |
| throw_on_list_find | Should this throw an error log if no list can be found with this name? |
| throw_on_property_find | Should this throw an error log if no property can be found in the list attached to this tile? |
|
inline |
Returns the generic unboxed value of a tile property variable, based on a reference to a tile object.
| tile | The tile object reference from a Tilemap. |
| property_name | The name of the property to search the property list(s) for. |
| property_type | The variable type of the property to search the property list(s) for. |
| throw_on_tile_find | Should this throw an error log if no tile can be found with this property? |
| throw_on_property_find | Should this throw an error log if no property can be found in the list attached to this tile? |
|
inline |
Removes a reference to a 'TileBase' object, at position 'index', in a specific tile property list.
See also:
| index | The list index for the removed tile. |
| property_list_name | The name of a 'TilePropertiesList' ScriptableObject in the Editor. |
|
inline |
Removes a reference to a 'TileBase' object, with the same name as 'new_tile', in a specific tile property list.
See also:
| old_tile | A soon-to-be removed tile object reference from a Tilemap. |
| property_list_name | The name of a 'TilePropertiesList' ScriptableObject in the Editor. |
|
inline |
Removes a tile property from a specific tile property list reference.
See also:
| property_list_name | The name of a 'TilePropertiesList' ScriptableObject in the Editor. |
| property_name | The string name of the soon-to-be removed tile property. |
| throw_on_list_find | Should this throw an error log if no list can be found with this name? |
| throw_on_property_find | Should this throw an error log if no property can be found in the list attached to this tile? |
|
inline |
Removes a tile property from a specific tile object.
See also:
| tile | The tile object reference from a Tilemap. |
| property_name | The name of the soon-to-be removed tile property. |
| throw_on_tile_find | Should this throw an error log if no tile can be found with this property? |
| throw_on_property_find | Should this throw an error log if no property can be found in the list attached to this tile? |
|
inline |
Sets the value of a specific 'TileBase' object reference in the list of affected tiles for a specific tile property list.
| tile | The soon-to-be replaced tile object reference from a Tilemap. |
| property_list_name | The name of a 'TilePropertiesList' ScriptableObject in the Editor. |
| index | The list index for the replaced tile. |
|
inline |
Sets the value of a tile property variable, based on a reference to a tile property list's name.
| property_list_name | The name of a 'TilePropertiesList' ScriptableObject in the Editor. |
| property_name | The name of the property to search the property list(s) for. |
| new_value | The new object value to set for this property in the list. |
| throw_on_list_find | Should this throw an error log if no list can be found with this name? |
| throw_on_property_find | Should this throw an error log if no property can be found in the list attached to this tile? |
|
inline |
Sets the value of a tile property variable, based on a reference to a tile object.
| tile | The tile object reference from a Tilemap. |
| property_name | The name of the property to search the property list(s) for. |
| new_value | The new object value to set for this property in the list. |
| throw_on_tile_find | Should this throw an error log if no tile can be found with this property? |
| throw_on_property_find | Should this throw an error log if no property can be found in the list attached to this tile? |
| List<TilePropertiesList> TileProperties.TilePropertiesManager.TilePropertyLists = new() |
|
staticget |
Singleton instance of the manager object.