Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by Fox-Handler · May 14, 2014 at 06:20 AM · gameobjectobject

object vs gameobject

While looking at images to show the class hierarchy for unity I ran across this image http://kimkijeung.com/blog/wp-content/uploads/2010/07/Unity3d-API-Hierarchy.png , and found out that an object and gameobject are not the same thing. So what is the difference between object and gameobject. Can someone give me an example of an object. Does it have anything to do with creating a new object like in javascript i.e. New Vector () for example?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
5
Best Answer

Answer by Andres-Fernandez · May 14, 2014 at 07:48 AM

Object is the base class for all objects in Unity. It offers instantiation and destruction functions, but not much more.

GameObject, besides being a subclass of Object, is the base class for all entities within scenes. It has a Transform component by default, and can have other components attached.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Fox-Handler · May 14, 2014 at 07:53 AM 0
Share

ok awesome thanks for helping to clear that up

avatar image Andres-Fernandez · May 14, 2014 at 07:54 AM 0
Share

Objects can be used in editor mode (for example) to get whatever you need in the input fields.

avatar image
2

Answer by Noob_Vulcan · May 14, 2014 at 07:26 AM

K ....you are right gameobject and object are both different .

  1. A GameObject is an object with a component "Transform". You can't remove this component from a gameobject. This thing makes it different from object.

  2. Where as Object in simple terms is an instance of a class. e.g ClassA obj=new ClassA().This obj doesnt have any component like "Transform".

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Noob_Vulcan · May 14, 2014 at 07:53 AM 0
Share

A class is a constuct/container to create your own custom types by grouping together variables of other types, methods and events.

And an object is used to access these variables or methods outside this class.

avatar image Fox-Handler · May 14, 2014 at 08:00 AM 0
Share

pretty technical but it does make sense thank you

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

24 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Unity3D Pressure Plate request. 3 Answers

Instantiating gameObject with custom Class properties 1 Answer

inspector,Component 0 Answers

Destroy object when transform.position.x > 10. 1 Answer

Is it necessary to assign the result of Instantiate() to a variable and is there a need to always typecast? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges