Life and Style Media - Tutorials

Version 1.4.x



A series of images with attributes and descriptions. These are very useful attributes, that you may use with your C# scripts, custom units, and Scriptable Objects, to alter how they appear, and to utilize the other various parts of the framework. Develop your extensions and code to better suit your needs.


Custom Units
There are many attributes that work specifically with custom units. These will be some of the ones you would use the most. Lets take a look.


Unit Title

Changes the label title everywhere. If the unit does not provide this, it will use the class name.

UnitTitle
(
string
title)

[
UnitTitle
(
"Type Writer"
)]
public class
TypeWriterUnit
:
Unit





Unit Short Title

Overrides the title on the unit only. Overrides the title attribute as well.

UnitShortTitle
(
string
title)

[
UnitShortTitle
(
"Watermelon"
)]
[
UnitTitle
(
"Type Writer"
)]
public class
TypeWriterUnit
:
Unit





Unit Sub Title

Adds a lable below the title on a unit.

UnitSubtitle
(
string
title)

[
UnitSubtitle
(
"Taco"
)]
[
UnitTitle
(
"Type Writer"
)]
public class
TypeWriterUnit
:
Unit




Unit Sur Title

Adds a lable above the title on a unit.

UnitSurtitle
(
string
title)

[
UnitSurtitle
(
"Soda"
)]
[
UnitTitle
(
"Type Writer"
)]
public class
TypeWriterUnit
:
Unit




Unit Header Inspectable

Allows a type that has an inspector to be shown at the top of the unit, as a way of providing options for the definition of the unit.

UnitHeaderInspectable
()

UnitHeaderInspectable
(
string
label)

[
UnitHeaderInspectable
(
"Delay [Default]"
)]
public bool
delayHasDefaultValue





Unit Category

Places your unit in a specific category at path. Nested by using a forward slash. Some unit types require a specific root category. Such as Events, Nesting, and Variables.

UnitCategory
(
string
category)

[
UnitCategory
(
"MyCategory"
)]
public class
TypeWriterUnit
:
Unit




Reflection
Useful attributes for anything that may deal with unit options and type reflection.


Renamed From

Securely change your type name by providing the old name with its namespace as a string. This will allow it to retain all data, preventing serialization issues.

RenamedFrom
(
string
previousName)

[
RenamedFrom
(
"Tutorials.TypeWriterUnit"
)]
public class
TypeWriterUnit
:
Unit


Include In Settings

Include or exclude a type when generating units, without adding them into the Type Options GUI Window.


IncludeInSettings
()

IncludeInSettings
(
bool
include)

[
IncludeInSettings
(
true
)]
public class
MyCustomClass


Editor GUI
Display and hide types, change the way they get displayed, and create inspectors without editor code.


Inspectable

Inspectable will let a type be shown in the inspector. Any class or struct that is marked Inspectable, will attempt to draw any member that is also mark with this same attribute. No extra editor code necessary. An inspector is a type of Property Drawer that lives in the Ludiq Framework only. Anytime a type is seen with any Ludiq based inspectors and editors, it has one of them.

Inspectable
()

[
Inspectable
]
public struct
Player

{
[
Inspectable
]
public bool
isAlive;

[
Inspectable
]
public int
health;
}




Inspector Label

Set a custom label for the types variable name.

InspectorLabel
(
string
label)


Inspector Toggle Left

Places the toggle checkmark box on the left side of text, instead of the default right.

InspectorToggleLeft
()


Inspector Wide

Places a field underneath the label, and the field will stretch acrossed the whole parent inspector.

InspectorWide
()


Type Icon

Uses another types Icon as this types icon.

TypeIcon
(System.
Type
type)