public override VisualElement CreatePropertyGUI(SerializedProperty property) { VoxelUVMap uvMap = (VoxelUVMap)property.GetValue(); var container = new VisualElement(); /*Label newLabel = new Label(); * newLabel.text = "Uvs [" + uvMap.uvs.Length + "]"; * container.Add(newLabel);*/ container.styleSheets.Add(Resources.Load <StyleSheet>("VoxelUvMapEditor/VoxelUvMapEditor")); var quickToolVisualTree = Resources.Load <VisualTreeAsset>("VoxelUvMapEditor/VoxelUvMapEditor"); quickToolVisualTree.CloneTree(container); Label uvsLengthLabel = container.Query("uvsLengthLabel").First() as Label; uvsLengthLabel.text = "Uvs [" + uvMap.uvs.Length + "]"; return(container); }
/*[ContextMenu("Generate UVs")] * public void GenerateUVs() * { * // using mesh datam - * // if one texture * }*/ public void InitializeCubeMap() { uvMap = new VoxelUVMap(); uvMap.Initialize(); // for cube! }