17 lines
637 B
GDScript
17 lines
637 B
GDScript
class_name SavedData
|
|
extends Resource
|
|
|
|
# Class that can save a single node's information
|
|
# Every node's save data can either use this SavedData class directly
|
|
# or extend from it and add node-specific values
|
|
# See "Saving and loading games with Godot" by Godotneers for details:
|
|
# https://www.youtube.com/watch?v=43BZsLZheA4&t=2234s
|
|
# https://github.com/godotneers/saving-loading-video/blob/main/godotneers-ensuring-saved-game-compatibility.pdf
|
|
|
|
# Position of the node to save
|
|
@export var position: Vector3 = Vector3.ZERO
|
|
|
|
@export var rotation: Vector3 = Vector3.ZERO
|
|
|
|
# Path to the scene of the node
|
|
@export var scene_path: String = ""
|