mirror of
https://github.com/Keyslam-Group/Concord.git
synced 2025-09-03 04:43:56 -04:00
Serializable component
You can remove the component to tell Concord an Entity shouldn't be serialized. It's given automatically on Entity creation, but this can be disabled by changing Entity.SERIALIZE_BY_DEFAULT to false.
This commit is contained in:
parent
892f4d4700
commit
cc0fd1614c
4 changed files with 32 additions and 4 deletions
12
concord/builtins/serializable.lua
Normal file
12
concord/builtins/serializable.lua
Normal file
|
@ -0,0 +1,12 @@
|
|||
local PATH = (...):gsub('%.builtins%.[^%.]+$', '')
|
||||
|
||||
local Component = require(PATH..".component")
|
||||
|
||||
local Serializable = Component("serializable")
|
||||
|
||||
function Serializable:serialize ()
|
||||
-- Don't serialize this Component
|
||||
return nil
|
||||
end
|
||||
|
||||
return Serializable
|
Loading…
Add table
Add a link
Reference in a new issue