Announcement

Collapse
No announcement yet.

Setting default u-properties values for C++ classes without using blueprints in editor.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [FEATURE REQUEST] Setting default u-properties values for C++ classes without using blueprints in editor.

    Hi!

    I would find it handy if you could set the default u-properties in the editor for the c++ classes you have made just as you would be able to if you bases a blueprint upon a c++ class. Since you can go through the classes already in the content browser it would be a nice way to remove a hard coded assets references or blueprints that just sets the default values. As it is now you must have hard coded references or basically the whole c++ class hierarchy in blueprints to set the default values for c++ classes. Using a config isn't unfortunately an option for me since the user shouldn't be able to modify there values.

    #2
    Fact that c++ classes appers in Content Browser does not mean they are stored like a asset, they are virtually there because people got addicted to Content Browser instead of using more proper for them Class Viewer (this is partly Epic fault hiding it deeply in Window menu). So there would need to be something to store them, i don't know if that good idea at all since you would have 2 things in end out the source directory for C++ class.

    Also i don't know if you aware of that, but you sound you don't (since you seem ready to use config files), currently you place default variables in class constructor, when you start editor or a game, engine creates default copy of class instance which will contain variables with default values. When you create or spawn objects engine simply stamp copy default object in to different space in memory and creates new instance. When you create blueprint from C++ class, blueprint editor will treat those defaults... as defaults
    Last edited by Shadowriver; 05-11-2015, 02:28 PM.
    =========
    My Tutorials:
    Basic knowledge about Classes and UObject environment and stuff like that

    Comment


      #3
      I'm not talking about how it could be implemented. This was meant as a suggestion of an improvement, a feature. I know how it works but what you are saying is to basically use hard coded default values and references. That is for many reasons very bad programing.

      What I mean is maybe it would be convenient to allow setting default values in the editor for the c++ classes and I don't mean changing the source code or the actual c++ classes in any way. Maybe that can be implemented by creating assets in the background for the classes you want to set defaults for or for all as you said, there are probably more ways of doing it also. As I said, using config isn't an option for me but it is almost convenient compared to creating the whole c++ class hierarchy in blueprints. Creating the whole c++ class hierarchy in blueprints needs to be done at the moment to set default values in the editor for the classes, so the implementation you suggest wouldn't be any worse than it already is today. The whole c++ class hierarchy must already be recreated in blueprints to set default values, just that it must happen manually.

      Also I never understood why the c++ class hierarchy appers in Content Browser as it is now. You can't really do anything with it plus that if you want to go through the project's file hierarchy, why would you start the editor instead of using visual studio. Is it some sort of bookmark or shortcut system?
      Last edited by undercover; 05-12-2015, 01:19 PM.

      Comment

      Working...
      X