pyunity.files module¶
Module to load files and scripts. Also manages project structure.
-
class
pyunity.files.Behaviour(transform, is_dummy=False)[source]¶ Bases:
pyunity.core.ComponentBase class for behaviours that can be scripted.
-
gameObject¶ GameObject that the component belongs to.
Type: GameObject
-
AddComponent(component)¶ Calls AddComponent on the component’s GameObject.
Parameters: component (Component) – Component to add. Must inherit from Component
-
FixedUpdate(dt)[source]¶ Called every frame, in each physics step.
Parameters: dt (float) – Length of this physics step
-
GetComponent(component)¶ Calls GetComponent on the component’s GameObject.
Parameters: componentClass (Component) – Component to get. Must inherit from Component
-
GetComponents(component)¶ Calls GetComponents on the component’s GameObject.
Parameters: componentClass (Component) – Component to get. Must inherit from Component
-
LateUpdate(dt)[source]¶ Called every frame, after physics processing.
Parameters: dt (float) – Time since last frame, sent by the scene that the Behaviour is in.
-
RemoveComponent(component)¶ Calls RemoveComponent on the component’s GameObject.
Parameters: component (Component) – Component to remove. Must inherit from Component
-