Skip to content

Assets refactoring #50

@Tomobodo

Description

@Tomobodo

Level should be assets, prefab as well, not be composed of an asset. The way assets are saved and loaded complexifies serialisation.

We should have an interface IRadAsset :

interface IRadAsset {
    function serialize() : Dynamic;
    function deSerialize(object : Dynamic) : IRadAsset;
    function save(path : String) : Void;
    function load(path : String) : IRadAsset;
    function getPath() : String;
}

Something like this. When saved, the RadAsset stringify its field with json and save it
If a component containing an RadAsset field is stringified, it use the serialize method of that asset to replace it in the json.
On load it use the deSerialize method to create the instance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions