Node priority...
Asked Answered
D

3

0

I am confuse with the priority parameter for the nodes, for me it dosent seem to do what I was expecting, and also , the docs says

"Nodes whose process priority value is lower will have their processing callbacks executed first."

I am trying to pre-load shaders before using in the scene, for this I tried to create an special node with :
@onready var shader1 = preload( "res://Shaders/shader1.gdshader" )
...

Its not working, when I try to use it somewhere else its null yet, I tried to change the load priority to -1, and to 5, dosent seems to do anything, and its confusing because the docs says less priority should gives more priority in the load order ???

Discommodity answered 16/5, 2023 at 14:45 Comment(0)
M
0

Discommodity _process() callback priority has nothing to do with shader compilation.

Mobley answered 16/5, 2023 at 18:39 Comment(0)
D
0

Mobley Ye, I did notice that... There is any way to know when it finished compilation ? I am just testing for null until its not anymore but I am not sure its the best way.

Discommodity answered 17/5, 2023 at 8:1 Comment(0)
M
0

Discommodity Make a minimal project that demonstrates the problem and post it. Hard to help you without seeing the specifics.

Mobley answered 17/5, 2023 at 11:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.