Is C# programming better in 5.3? It feels like 5.4 was done poorly. The API for 5.4 is missing most of the classes, or the search bar doesn't work or both. The UI tutorials on the wiki are for 5.3 and don't work in 5.4. ((Text rendering, buttons, etc.) drawing rectangles work) (Text rendering simply doesn't work.)
I chose C# because it's easier to use than C++. Is C++ more popular and so support for C# is lacking due to the focus being C++? Should I use C++?
I just find it weird that the most basic of tasks don't work very well. Even the Menu tutorial for 5.3 seems backwards to me, and maybe that's due to a limited use of object oriented programming on my part. I think most of the code could be simplified into one or two classes. The benefit is that it's a lot easier to read and understand. Although, I guess arguably it wouldn't be as easy to expand upon later.
I wouldn't complain, and I would just say "I suck, and don't know what I'm doing". But when I read posts like this one from a year ago I start thinking "I'm not crazy?"
https://www.cryengine.com/community_arc ... 5&t=134149
For instance, this is the code for drawing text. Very simple and straight forward. Similar to how I created UI in Java. I get a crash whenever I try to run this.
There's something wrong with "var can = SceneObject.Instantiate<UIElement>(this);" and maybe the line below but without an updated API it makes it very difficult to figure out whats wrong.
I don't want to deal with ActionScript cause I just want a very simple and basic UI.
I've tried exchanging UIElement for Canvas and Panel. Tried switching out "this" with SceneManager.RootObject and "null".
Code: Select all
class UIHomeMenu : UIElement
public event Action StartPressed;
public event Action QuitToDesktopPressed;
// private UIButtonList _mainMenuButtons;
// private UIButtonList _text;
public override void OnAwake()
//Code for working rectangle was here
//create text below.
var can = SceneObject.Instantiate<UIElement>(this); //
var text = can.AddComponent<Text>();
text.Alignment = Alignment.Center;
text.Height = 24;
text.Content = "text";
text.Offset = new Point(0f, 0f);
I hope it doesn't sound like I'm just trying to bash. Heh, pun? The forums are extremely helpful and many people helped me out with the last post I made and I'm grateful for that. It's just frustrating that such a menial task has no documentation and doesn't work.
Is there a better documented version that I should switch to?