Prefab Package
A Prefab Package is essentially a ZIP file containing Prefabs and an index listing those prefabs and additional metadata.
Properties
| Name | Type | Default | Access | Description |
|---|---|---|---|---|
category | 1i | 0 | 🟩🟥 | Category |
copyrightInfoUrl | 1s | 🟩🟥 | Metadata, link to copyright info | |
copyrightNotice | 1s | 🟩🟥 | Metadata, copyright notice | |
copyrightStatus | 1i | 0 | 🟩🟥 | Metadata, CopyrightStatus |
creator | 1s | 🟩🟥 | Metadata, creator of asset | |
description | 1s | 🟩🟥 | Metadata, description | |
guid | 1s | 🟩❌ | Globally unique identifier | |
headline | 1s | 🟩🟥 | Metadata, headline | |
keywords | 1s | 🟩🟥 | Metadata, keyword | |
title | 1s | 🟩🟥 | Metadata, title | |
unitScale | 1f | 1.0 | 🟩🟥 | Unit scale |
Details
Type1b: boolean1c: color (integer)1i: integer1f: float1s: string2b: 2-component boolean vector2i: 2-component integer vector2f: 2-component float vector3b: 3-component boolean vector3i: 3-component integer vector3f: 3-component float vector
Access
🟩 : Property value can be read with FxFile.Get
🟥 : Property value can be changed with FxFile.Set
❌ : Property value is read-only and can't be changed
Create
To create a new prefab package use FxFile.Create with FileType 445.
packageID = FxFile.Create(445);
packageID = FxFile.Rename(445, packageID, "MyPackage"); -- rename new package
FxFile.Open(445, packageID); -- open new packageFiles
The default prefab package is located at Programs\Foxel Studio\default.fxlpkg. Other custom packages are stored as shared files in Shared\PrefabPackages\ with the extension .fxlpkg.