SyncListVegetationInstance
Introduction
The SyncListVegetationInstance
is a class in Unity that extends the SyncListStruct
class, which is a serializable class that can synchronize the state of structs across clients in a Unity Multiplayer Networking environment. The SyncListVegetationInstance
is specifically used to synchronize the state of vegetation instances across clients in the environment.
This class contains the properties and methods necessary to ensure that each client has an up-to-date list of vegetation instances and can properly modify and synchronize the list with other clients. It contains methods to add, remove, and update vegetation instances, as well as methods to properly serialize and deserialize the data for network transmission.
The SyncListVegetationInstance
class also contains an event that is raised whenever the list is modified. This event can be subscribed to by other scripts in the Unity environment to perform additional actions when the list is updated.
Overall, the SyncListVegetationInstance
is an important tool for ensuring that vegetation instances are properly synchronized across clients in a Unity Multiplayer Networking environment.
Overview
This file defines the SyncListVegetationInstance
class.
Interface
This class does not implement an interface.
Constructors
This class does not have any constructors.
Methods
This class does not have any methods.
Properties
Name | Type | Summary |
---|---|---|
currentTime |
float |
The time that the tree was added to the list. |
position |
Vector3 |
The tree position in the world, this is a local position. |
rotation |
Quaternion |
The rotation of the tree. |
scale |
Vector3 |
The tree scale. |
harvestableObjectName |
string |
The name of the harvestable object. |
vegetationType |
string |
The type of vegetation. |
VegetationItemInstanceID |
string |
The ID of the vegetation item instance. |
VegetationItemID |
string |
The ID of the vegetation item. |
tag |
string |
The tag of the object. |
enabled |
bool |
Whether the object is enabled. |
explosionPosition |
Vector3 |
The position of the explosion. |
harvestingRestoreTime |
float |
The time it takes for the vegetation to restore after harvesting. |
Events
This class does not have any events.
Concepts/Guides
This class is used to synchronize vegetation instances.
Examples
This class is not used in any examples.
Unity Usage
This class is not part of Unity and does not have any Unity usage.