x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Difference between UClass and UObject

I know that UCLASS() macro creates a seperate UClass for every UObject class ,but what is the need for this seperate class , how both of these classes relate to each other and what is the basic difference between both of them??

Product Version: UE 4.19
Tags:
more ▼

asked Jul 16 '18 at 03:37 PM in C++ Programming

avatar image

luGo0
10 3 4 6

avatar image luGo0 Jul 19 '18 at 11:12 AM

This might be usefull as well!! This Answer on the exact same question

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

A "UClass" instance contains reflection data (properties, base types, etc.) about a type, whereas a UObject is the base class for any kind of engine-related object class. Classes you write will almost never inherit from UClass (I'm not even sure if you can), but they can inherit from UObject.

more ▼

answered Jul 16 '18 at 06:36 PM

DarkwindRichard (suspended)
avatar image Shadowriver Jul 20 '18 at 07:27 AM

Not about type, but class, UClass is also UObject as all classes with U prefix. There entire family tree of classes that contain reflection system information elements and all inherent from UField

http://api.unrealengine.com/INT/API/Runtime/CoreUObject/UObject/UField/

And yes you can inherent from UClass if you ever need to extend reflection system for some reason, Blueprint and UMG have extra code on UClass

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question