Lua Scripting example for Color brush resource reference
AnsweredIs it possible to provide an example of a lua script obtaining a color brush resource reference and setting the foreground color brush on a node. I have tried the following:
local clbWhite = contextNode:tryAcquireResource("kzb://pagination/Brushes/clbWhite")
item:setProperty(Node2D.ForegroundBrush, White)
but I seem to get an error "property Type is not a table"
0
-
Assuming that item node points to a valid node, it should be ForgroundBrushProperty instead of ForegroundBrush.
You can find the list of property types in Lua documentation page here.0
Please sign in to leave a comment.
Comments
1 comment