Class PaintableComponent
Adds painting support to world objects. World objects this component attached can have three colorable regions defined.
These regions receive color through shader inputs that apply channel 1 - 3 to RGB masked regions on the model.
Inheritance
System.Object
PaintableComponent
Implements
System.ComponentModel.INotifyPropertyChanged
Assembly: Eco.Gameplay.dll
Syntax
public sealed class PaintableComponent : WorldObjectComponent, ILinkable, IOwned, IController, IViewController, IHasUniversalID, IHasSerializableID, IRPCAuthChecks, INotifyPropertyChanged, IThreadSafeSubscriptions, ISubscriptions<ThreadSafeSubscriptions>, ISubscriptions, IHasInteractions, IPersistentData
Constructors
PaintableComponent()
Declaration
public PaintableComponent()
Properties
Availability
Declaration
public override WorldObjectComponentClientAvailability Availability { get; }
Property Value
Overrides
PaintData
Declaration
public PaintableItemData PaintData { get; set; }
Property Value
PersistentData
Declaration
public object PersistentData { get; set; }
Property Value
Type |
Description |
System.Object |
|
Methods
CanBePainted(ByteColor, Int32)
Check if target channel can accept paint. Ex if its already same paint if will return false, etc.
Declaration
public bool CanBePainted(ByteColor color, int channel)
Parameters
Type |
Name |
Description |
ByteColor |
color |
|
System.Int32 |
channel |
|
Returns
Type |
Description |
System.Boolean |
|
ClearColor(Int32)
Declaration
public bool ClearColor(int channel)
Parameters
Type |
Name |
Description |
System.Int32 |
channel |
|
Returns
Type |
Description |
System.Boolean |
|
ClearColors()
Declaration
public bool ClearColors()
Returns
Type |
Description |
System.Boolean |
|
GetColor(Int32, out ByteColor)
Declaration
public bool GetColor(int channel, out ByteColor color)
Parameters
Type |
Name |
Description |
System.Int32 |
channel |
|
ByteColor |
color |
|
Returns
Type |
Description |
System.Boolean |
|
SetColor(ByteColor)
Declaration
public void SetColor(ByteColor color)
Parameters
SetColor(Int32, NamedColors)
Sets a channel color to the specified color. If the color specified is ClearBlack then the object
reverts to its default color as defined in the client prefab.
Declaration
public bool SetColor(int channel, NamedColors color)
Parameters
Type |
Name |
Description |
System.Int32 |
channel |
Channel to modify. Accepts a value of 1 through 3.
|
NamedColors |
color |
|
Returns
Type |
Description |
System.Boolean |
True if the color was changed. Otherwise false.
|
SetColor(Int32, ByteColor)
Sets a channel color to the specified color. If the color specified is ClearBlack then the object
reverts to its default color as defined in the client prefab.
Declaration
public bool SetColor(int channel, ByteColor color)
Parameters
Type |
Name |
Description |
System.Int32 |
channel |
Channel to modify. Accepts a value of 1 through 3.
|
ByteColor |
color |
Color to set the channel as.
|
Returns
Type |
Description |
System.Boolean |
True if the color was changed. Otherwise false.
|
Implements
System.ComponentModel.INotifyPropertyChanged
Extension Methods