Show / Hide Table of Contents

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
WorldObjectComponent
PaintableComponent
Implements
ILinkable
IOwned
IController
IViewController
IHasUniversalID
IHasSerializableID
IRPCAuthChecks
System.ComponentModel.INotifyPropertyChanged
IThreadSafeSubscriptions
ISubscriptions<ThreadSafeSubscriptions>
ISubscriptions
IHasInteractions
IPersistentData
Inherited Members
WorldObjectComponent.IsRPCAuthorized(IWorldObserver, AccessType, Object[])
WorldObjectComponent.Initialize()
WorldObjectComponent.PostInitialize()
WorldObjectComponent.OnCreate()
WorldObjectComponent.Destroy()
WorldObjectComponent.Tick()
WorldObjectComponent.LateTick()
WorldObjectComponent.TryPickup(Player, InventoryChangeSet, Inventory, Boolean)
WorldObjectComponent.OnPickup(Player)
WorldObjectComponent.OnBeforeObjectMoved()
WorldObjectComponent.OnAfterObjectMoved()
WorldObjectComponent.OnLinkClicked(TooltipOrigin, TooltipClickContext, User)
WorldObjectComponent.UILinkContent()
WorldObjectComponent.Parent
WorldObjectComponent.Name
WorldObjectComponent.IconName
WorldObjectComponent.ForceActiveTab
WorldObjectComponent.ComponentPrefabName
WorldObjectComponent.ComponentTabName
WorldObjectComponent.Enabled
WorldObjectComponent.IsDestroyed
WorldObjectComponent.ShouldRequestEverything
WorldObjectComponent.Owners
WorldObjectComponent.ControllerID
WorldObjectComponent.IOwned.Deed
WorldObjectComponent.Subscriptions
WorldObjectComponent.PropertyChanged
Namespace: Eco.Gameplay.Components
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
Type Description
WorldObjectComponentClientAvailability
Overrides
WorldObjectComponent.Availability

PaintData

Declaration
public PaintableItemData PaintData { get; set; }
Property Value
Type Description
PaintableItemData

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
Type Name Description
ByteColor color

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

ILinkable
IOwned
IController
IViewController
IHasUniversalID
IHasSerializableID
IRPCAuthChecks
System.ComponentModel.INotifyPropertyChanged
IThreadSafeSubscriptions
ISubscriptions<TSubscriptionsList>
ISubscriptions
IHasInteractions
IPersistentData

Extension Methods

TagUtils.TagNames(Object, Boolean)
TagUtils.TagDisplayNames(Object, Boolean)
ClientSetViewExtensions.SetClassOfProperty(Object, Player, String, String, Int32)
TypeTooltipExtensions.UILinkGeneric(Object)
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾