Skip to content

Struct Engine::PrefabInstance

ClassList > Engine > PrefabInstance

Marks the root of a subtree that was saved as or spawned from a .prefab .More...

  • #include <PrefabInstance.hpp>

Public Attributes

Type Name
std::string prefabPath

Public Static Functions

Type Name
PrefabInstance Create (std::string path="")
Creates a PrefabInstance .

Detailed Description

prefabPath is project-relative. Saving the prefab from the preview copies the sprite path, sprite scale, shape size, and script onto every instance. Position stays where each instance was placed.

Public Attributes Documentation

variable prefabPath

std::string Engine::PrefabInstance::prefabPath;

Public Static Functions Documentation

function Create

Creates a PrefabInstance .

static inline PrefabInstance Engine::PrefabInstance::Create (
    std::string path=""
) 

Parameters:

  • path Project-relative path of the .prefab file.


The documentation for this class was generated from the following file /home/runner/work/r-type/r-type/Engine/include/Components/PrefabInstance.hpp