Class EntityVisual
Inheritance
object
UnityEngine.Object
UnityEngine.Component
UnityEngine.Behaviour
UnityEngine.MonoBehaviour
Mirror.NetworkBehaviour
EntityVisual
Assembly: Dew.Core.dll
Syntax
[HideMonoScript]
[RequireComponent(typeof(EntityHighlightProvider))]
[LogicUpdatePriority(-299)]
public class EntityVisual : EntityComponent, ILogicUpdate, ICleanup
Fields
accessoryInstances
Declaration
[NonSerialized]
public List<Accessory> accessoryInstances
Field Value
| Type |
Description |
| System.Collections.Generic.List<T><Accessory> |
|
ClientEvent_OnGroundMarkerHiddenChanged
Declaration
public SafeAction<bool> ClientEvent_OnGroundMarkerHiddenChanged
Field Value
ClientEvent_OnModelLoaded
Declaration
public SafeAction ClientEvent_OnModelLoaded
Field Value
ClientEvent_OnRendererEnabledChanged
Declaration
public SafeAction<bool> ClientEvent_OnRendererEnabledChanged
Field Value
ClientEvent_OnSpawnComplete
Called when the entity finishes spawning or spawning is skipped.
Declaration
public SafeAction ClientEvent_OnSpawnComplete
Field Value
dazeAfterSpawnDuration
Declaration
public float dazeAfterSpawnDuration
Field Value
delayLoopEffectTilSpawned
Declaration
[LabelText("Delay Loop Effect Until Spawned")]
[FormerlySerializedAs("delayStartEffectTilSpawned")]
[ToggleLeft]
public bool delayLoopEffectTilSpawned
Field Value
delaySpawnEffectOnGroundTilSpawned
Declaration
[LabelText("Delay Until Spawned")]
[ShowIf("@spawnEffectOnGround != null", true)]
public bool delaySpawnEffectOnGroundTilSpawned
Field Value
delaySpawnEffectUntilSpawned
Declaration
[LabelText("Delay Until Spawned")]
[ShowIf("@spawnEffect != null", true)]
public bool delaySpawnEffectUntilSpawned
Field Value
Declaration
[NonSerialized]
public bool disableModelTransformUpdate
Field Value
doPositionOffset
Declaration
public bool doPositionOffset
Field Value
doScaling
Declaration
Field Value
invisibleByDefault
Set this true on before spawn to make entities invisible by default, appearing after EnableRenderers is called.
Declaration
[NonSerialized]
public bool invisibleByDefault
Field Value
invulnerableWhileSpawning
Declaration
public bool invulnerableWhileSpawning
Field Value
mirageSkinObjects
Declaration
public Dictionary<string, List<GameObject>> mirageSkinObjects
Field Value
| Type |
Description |
| System.Collections.Generic.Dictionary<TKey, TValue><string, System.Collections.Generic.List<T><UnityEngine.GameObject>> |
|
model
Declaration
[NonSerialized]
public EntityModel model
Field Value
Declaration
[NonSerialized]
public Transform modelTransform
Field Value
| Type |
Description |
| UnityEngine.Transform |
|
renderers
Declaration
[NonSerialized]
public List<Renderer> renderers
Field Value
| Type |
Description |
| System.Collections.Generic.List<T><UnityEngine.Renderer> |
|
skipSpawning
Set this true on before spawn to make entities pop in instead of play its spawning effects, voices and animations.
Declaration
[NonSerialized]
public bool skipSpawning
Field Value
solidRenderers
Declaration
[NonSerialized]
public List<Renderer> solidRenderers
Field Value
| Type |
Description |
| System.Collections.Generic.List<T><UnityEngine.Renderer> |
|
spawnAnim
Declaration
public DewAnimationClip spawnAnim
Field Value
spawnDuration
Declaration
[Title("Spawn", null, TitleAlignments.Left, true, true)]
public float spawnDuration
Field Value
spawnEffect
Declaration
[Title("Effects", null, TitleAlignments.Left, true, true)]
public GameObject spawnEffect
Field Value
| Type |
Description |
| UnityEngine.GameObject |
|
spawnEffectOnGround
Declaration
public GameObject spawnEffectOnGround
Field Value
| Type |
Description |
| UnityEngine.GameObject |
|
spawnXOffset
Declaration
[ShowIf("doPositionOffset", true)]
public AnimationCurve spawnXOffset
Field Value
| Type |
Description |
| UnityEngine.AnimationCurve |
|
spawnXScale
Declaration
[ShowIf("doScaling", true)]
[LabelText("@useSeparateAxis ? \"Spawn X Scale\" : \"Spawn Scale\"")]
public AnimationCurve spawnXScale
Field Value
| Type |
Description |
| UnityEngine.AnimationCurve |
|
spawnYOffset
Declaration
[ShowIf("doPositionOffset", true)]
public AnimationCurve spawnYOffset
Field Value
| Type |
Description |
| UnityEngine.AnimationCurve |
|
spawnYScale
Declaration
[ShowIf("@doScaling && useSeparateAxis", true)]
public AnimationCurve spawnYScale
Field Value
| Type |
Description |
| UnityEngine.AnimationCurve |
|
spawnZOffset
Declaration
[ShowIf("doPositionOffset", true)]
public AnimationCurve spawnZOffset
Field Value
| Type |
Description |
| UnityEngine.AnimationCurve |
|
spawnZScale
Declaration
[ShowIf("@doScaling && useSeparateAxis", true)]
public AnimationCurve spawnZScale
Field Value
| Type |
Description |
| UnityEngine.AnimationCurve |
|
useSeparateAxis
Declaration
[ShowIf("doScaling", true)]
public bool useSeparateAxis
Field Value
Properties
currentYOffset
Declaration
public float currentYOffset { get; }
Property Value
currentYVelocity
Declaration
public float currentYVelocity { get; }
Property Value
etLocalOffset
Declaration
public Vector3 etLocalOffset { get; }
Property Value
| Type |
Description |
| UnityEngine.Vector3 |
|
etRotation
Declaration
public Quaternion etRotation { get; }
Property Value
| Type |
Description |
| UnityEngine.Quaternion |
|
etScaleMultiplier
Declaration
public Vector3 etScaleMultiplier { get; }
Property Value
| Type |
Description |
| UnityEngine.Vector3 |
|
etWorldOffset
Declaration
public Vector3 etWorldOffset { get; }
Property Value
| Type |
Description |
| UnityEngine.Vector3 |
|
genericStackIndicatorMax
Declaration
public int genericStackIndicatorMax { get; set; }
Property Value
genericStackIndicatorValue
Declaration
public int genericStackIndicatorValue { get; set; }
Property Value
highlight
Declaration
public EntityHighlightProvider highlight { get; }
Property Value
isGroundMarkerHidden
Declaration
public bool isGroundMarkerHidden { get; }
Property Value
isRendererOff
Declaration
public bool isRendererOff { get; }
Property Value
isSpawning
Declaration
public bool isSpawning { get; }
Property Value
materials
List of this entity's materials. (Instantiated)
Declaration
public IReadOnlyList<Material> materials { get; }
Property Value
| Type |
Description |
| System.Collections.Generic.IReadOnlyList<T><UnityEngine.Material> |
|
Methods
AddSharedMaterialLocal(Material)
Locally add a material to all mesh renderers of this entity.
Declaration
public void AddSharedMaterialLocal(Material material)
Parameters
| Type |
Name |
Description |
| UnityEngine.Material |
material |
|
Awake()
Declaration
protected override void Awake()
Overrides
DisableRenderers()
Make this entity invisible by turning off all renderers everywhere.
Declaration
public void DisableRenderers()
DisableRenderersLocal()
Locally make this entity invisible by turning off all renderers.
Declaration
public void DisableRenderersLocal()
EnableRenderers()
Undo this entity's DisableRenderers() and make it visible again everywhere.
Declaration
public void EnableRenderers()
EnableRenderersLocal()
Locally undo this entity's DisableRenderers() and make it visible again.
Declaration
public void EnableRenderersLocal()
FixClothes()
Declaration
FixTails()
Declaration
FixTailsAndClothes()
Declaration
public void FixTailsAndClothes()
FrameUpdate()
Declaration
public override void FrameUpdate()
Overrides
GetAbovePosition()
Declaration
public Vector3 GetAbovePosition()
Returns
| Type |
Description |
| UnityEngine.Vector3 |
|
GetBasePosition()
Declaration
public Vector3 GetBasePosition()
Returns
| Type |
Description |
| UnityEngine.Vector3 |
|
GetBodyBounds()
Get bounds of renderers specified as "body" of this entity.
Declaration
public Bounds GetBodyBounds()
Returns
| Type |
Description |
| UnityEngine.Bounds |
|
GetBonePosition(HumanBodyBones)
This will return center position if the bone couldn't be found.
Declaration
public Vector3 GetBonePosition(HumanBodyBones bone)
Parameters
| Type |
Name |
Description |
| UnityEngine.HumanBodyBones |
bone |
|
Returns
| Type |
Description |
| UnityEngine.Vector3 |
|
GetBoneRotation(HumanBodyBones)
This will return entity's rotation if the bone couldn't be found.
Declaration
public Quaternion GetBoneRotation(HumanBodyBones bone)
Parameters
| Type |
Name |
Description |
| UnityEngine.HumanBodyBones |
bone |
|
Returns
| Type |
Description |
| UnityEngine.Quaternion |
|
GetCenterPosition()
Declaration
public Vector3 GetCenterPosition()
Returns
| Type |
Description |
| UnityEngine.Vector3 |
|
GetMuzzlePosition()
Declaration
public Vector3 GetMuzzlePosition()
Returns
| Type |
Description |
| UnityEngine.Vector3 |
|
GetMuzzleRotation()
Declaration
public Quaternion GetMuzzleRotation()
Returns
| Type |
Description |
| UnityEngine.Quaternion |
|
GetNewColorModifier()
Gets a new color modifier for this entity. The color is applied locally.
Declaration
public EntityColorModifier GetNewColorModifier()
Returns
GetNewShellModifier()
Gets a new color modifier for this entity. The color is applied locally.
Declaration
public EntityShellModifier GetNewShellModifier()
Returns
Gets a new transform modifier for this entity. The transform is applied locally to its model.
Declaration
public EntityTransformModifier GetNewTransformModifier()
Returns
GetRenderBounds()
Get bounds of all solid renderers.
Declaration
public Bounds GetRenderBounds()
Returns
| Type |
Description |
| UnityEngine.Bounds |
|
GetWeaponPosition()
Declaration
public Vector3 GetWeaponPosition()
Returns
| Type |
Description |
| UnityEngine.Vector3 |
|
GetWeaponRotation()
Declaration
public Quaternion GetWeaponRotation()
Returns
| Type |
Description |
| UnityEngine.Quaternion |
|
HideGroundMarker()
Declaration
public void HideGroundMarker()
HideGroundMarkerLocal()
Declaration
public void HideGroundMarkerLocal()
KnockUp(KnockUpStrength, bool)
Knock up this entity everywhere.
Declaration
public void KnockUp(KnockUpStrength strength, bool isFriendly)
Parameters
KnockUp(float, bool)
Knock up this entity everywhere. Strength: 0.8(Small), 1.1(Normal), 1.5(Big)
Declaration
public void KnockUp(float strength, bool isFriendly)
Parameters
| Type |
Name |
Description |
| float |
strength |
|
| bool |
isFriendly |
|
LoadModelDefault()
Declaration
public void LoadModelDefault()
LoadModelDefaultLocal()
Declaration
public void LoadModelDefaultLocal()
LoadModelLocal(EntityModel)
Locally change model of this entity. You can provide either a model in a prefab, or the default one in the spawned entity.
The provided model must be fresh; it must never be the already initialized instance of EntityModel.
Declaration
public void LoadModelLocal(EntityModel m)
Parameters
LogicUpdate(float)
Declaration
public override void LogicUpdate(float dt)
Parameters
| Type |
Name |
Description |
| float |
dt |
|
Overrides
OnDestroy()
Declaration
protected override void OnDestroy()
Overrides
OnLateStartServer()
Declaration
public override void OnLateStartServer()
Overrides
OnStart()
Declaration
public override void OnStart()
Overrides
OnStartClient()
Declaration
public override void OnStartClient()
Overrides
OnStartServer()
Declaration
public override void OnStartServer()
Overrides
OnStop()
Declaration
public override void OnStop()
Overrides
OnStopServer()
Declaration
public override void OnStopServer()
Overrides
RemoveMaterialLocal(Material)
Locally remove a material from all mesh renderers of this entity.
Declaration
public void RemoveMaterialLocal(Material material)
Parameters
| Type |
Name |
Description |
| UnityEngine.Material |
material |
|
SetShaderProperty(string, float)
Declaration
public void SetShaderProperty(string key, float value)
Parameters
| Type |
Name |
Description |
| string |
key |
|
| float |
value |
|
SetShaderProperty(string, Color)
Declaration
public void SetShaderProperty(string key, Color value)
Parameters
| Type |
Name |
Description |
| string |
key |
|
| UnityEngine.Color |
value |
|
SetShaderPropertyLocal(int, float)
Declaration
public void SetShaderPropertyLocal(int propertyId, float value)
Parameters
| Type |
Name |
Description |
| int |
propertyId |
|
| float |
value |
|
SetShaderPropertyLocal(int, Color)
Declaration
public void SetShaderPropertyLocal(int propertyId, Color value)
Parameters
| Type |
Name |
Description |
| int |
propertyId |
|
| UnityEngine.Color |
value |
|
SetShaderPropertyLocal(string, float)
Declaration
public void SetShaderPropertyLocal(string key, float value)
Parameters
| Type |
Name |
Description |
| string |
key |
|
| float |
value |
|
SetShaderPropertyLocal(string, Color)
Declaration
public void SetShaderPropertyLocal(string key, Color value)
Parameters
| Type |
Name |
Description |
| string |
key |
|
| UnityEngine.Color |
value |
|
SetYOffset(float)
Declaration
public void SetYOffset(float offset)
Parameters
| Type |
Name |
Description |
| float |
offset |
|
SetYOffsetLocal(float)
Declaration
public void SetYOffsetLocal(float offset)
Parameters
| Type |
Name |
Description |
| float |
offset |
|
SetYVelocity(float)
Declaration
public void SetYVelocity(float velocity)
Parameters
| Type |
Name |
Description |
| float |
velocity |
|
SetYVelocityLocal(float)
Declaration
public void SetYVelocityLocal(float velocity)
Parameters
| Type |
Name |
Description |
| float |
velocity |
|
ShowGroundMarker()
Declaration
public void ShowGroundMarker()
ShowGroundMarkerLocal()
Declaration
public void ShowGroundMarkerLocal()
SkipSpawning()
Cancels ongoing spawn animation of this entity.
Declaration
public void SkipSpawning()
Explicit Interface Implementations
ICleanup.canDestroy
Declaration
bool ICleanup.canDestroy { get; }
Returns
ICleanup.OnCleanup()
Declaration
void ICleanup.OnCleanup()
Implements
Extension Methods