Pixelpart 1.8.2
Godot Plugin
Loading...
Searching...
No Matches
PixelpartEffectResource.h
1#ifndef PIXELPART_EFFECT_RESOURCE_H
2#define PIXELPART_EFFECT_RESOURCE_H
3
4#include <godot_cpp/classes/resource.hpp>
5#include <godot_cpp/variant/packed_byte_array.hpp>
6#include <pixelpart-runtime/asset/EffectAsset.h>
7
8namespace godot {
15class PixelpartEffectResource : public Resource {
16 GDCLASS(PixelpartEffectResource, Resource)
17
18public:
19 PixelpartEffectResource();
20 virtual ~PixelpartEffectResource();
21
22#ifdef DOXYGEN
26 PackedByteArray data;
27#endif
28
34 void import(String filepath);
35
41 void load();
42
47 void release();
48
54 void set_data(PackedByteArray bytes);
55
61 PackedByteArray get_data() const;
62
63 const pixelpart::EffectAsset& get_asset() const;
64
65protected:
66 static void _bind_methods();
67
68private:
69 PackedByteArray data;
70
71 pixelpart::EffectAsset effectAsset;
72 bool loaded = false;
73};
74}
75
76#endif
void set_data(PackedByteArray bytes)
Set the effect data manually.
Definition PixelpartEffectResource.cpp:47
PackedByteArray get_data() const
Return the effect data.
Definition PixelpartEffectResource.cpp:50
void release()
Release the loaded effect.
Definition PixelpartEffectResource.cpp:42
PackedByteArray data
Effect data as byte array.
Definition PixelpartEffectResource.h:26
void load()
Load the imported effect data.
Definition PixelpartEffectResource.cpp:26