- Home /
Question by
unity_qrj_5UYMolP0jA · Feb 21, 2021 at 04:13 PM ·
c#scripting problemgraph
Align content in GraphView Node
Is there a way I can align my TextField so it's next to my FacePic image? I'm accessing the style of the UIElement directly through code. So for example;
faceButt.style.[property] = [property];
I'm just unsure what code to use, and which elements to target. I.E. Do I access the Style of the FacePic and TextField, or do I effect the style of node.mainContainer?
node.png
(30.4 kB)
Comment
Answer by unity_qrj_5UYMolP0jA · Feb 21, 2021 at 04:55 PM
SOLVED :D
So I put my facePicButt and TextField into the ExtensionContainer of the node. Then I set the ExtensionContainer's FlexDirection to row using this;
node.extensionContainer.style.flexDirection = FlexDirection.Row;
node.extensionContainer.Add(facePicButt);
node.extensionContainer.Add(messageTextField);
Your answer
Follow this Question
Related Questions
Casting a GraphView node using GetNodeByGuid() returns null 1 Answer
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Nodes in GraphView appear white. 0 Answers