Class Prefab


public class Prefab extends NetComponent
Injects a prefab to an object
  • Constructor Details

  • Method Details

    • onAddComponent

      public void onAddComponent()
      Description copied from class: ObjectComponent
      Method will be called when component will be added to the object.
      Overrides:
      onAddComponent in class ObjectComponent
    • getPrefabName

      public String getPrefabName()
    • setPrefabName

      public void setPrefabName(String prefabName)
    • onSynchronize

      public NetBlock onSynchronize()
      Description copied from class: NetComponent
      Object synchronization is handled over a TCP connection to ensure that component will be updated.
      Overrides:
      onSynchronize in class NetComponent
      Returns:
      NetBlock
    • onSynchronizeReceived

      public void onSynchronizeReceived(String data)
      Description copied from class: NetComponent
      Event is fired when synchronization is received in the component.
      Overrides:
      onSynchronizeReceived in class NetComponent
      Parameters:
      data - Data from the NetBlock