Add a special editor-only preview material
This commit is contained in:
parent
4961d18cad
commit
a30cf97f8a
@ -0,0 +1,5 @@
|
||||
[gd_resource type="StandardMaterial3D" format=3 uid="uid://dcfkcyddxkglf"]
|
||||
|
||||
[resource]
|
||||
cull_mode = 2
|
||||
albedo_color = Color(0.849621, 0.849621, 0.849621, 1)
|
@ -310,7 +310,8 @@ var _watchlist_teleportables: Dictionary[int, TeleportableMeta] = {}
|
||||
|
||||
#region Editor Configuration Stuff
|
||||
|
||||
const _PORTAL_SHADER = preload("uid://bhdb2skdxehes")
|
||||
const _PORTAL_SHADER: Shader = preload("uid://bhdb2skdxehes")
|
||||
const _EDITOR_PREVIEW_PORTAL_MATERIAL: StandardMaterial3D = preload("uid://dcfkcyddxkglf")
|
||||
|
||||
# _ready(), but only in editor.
|
||||
func _editor_ready() -> void:
|
||||
@ -569,6 +570,9 @@ func _setup_mesh() -> void:
|
||||
mi.mesh = p
|
||||
mi.scale.z = _portal_thickness
|
||||
|
||||
# Editor-only material. Will be replaced when game starts.
|
||||
mi.material_override = _EDITOR_PREVIEW_PORTAL_MATERIAL
|
||||
|
||||
add_child_in_editor(self, mi)
|
||||
_portal_mesh_path = get_path_to(mi)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user