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
0
Question by MackTuesday · Oct 16, 2014 at 01:46 AM · learningtheory

Learning Unity Internals

This is a bit hard to explain.

So far all of the learning materials I've seen take one of two approaches: 1. Use case tutorial, i.e. "How to do X"; 2. Manual or reference.

Neither focuses on what I want: theory. I don't mean the theoretical details of video game technology, I know where to find that stuff. I mean the things strictly about Unity, the software, that will allow me to figure things out logically, rather than by trial and error or asking someone else. If such information is in the manual or reference, it's scattered around in a useless way.

For example, recently I made a public variable of class Foo in my script Bar so I could drag a Foo into the Bar component in the inspector. Foo was defined in my Foo script, but I couldn't drag the Foo script into the Bar component. However, I found that I could drag in an object that had the Foo script as a component. I didn't know Unity would go find the Foo in that object (and anyway I now understand that I was conflating a Foo with the definition of a Foo). That particular detail of Unity's behavior doesn't seem to be in any of the materials I've seen.

Any ideas?

Comment
Add comment · Show 1
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 KayelGee · Oct 16, 2014 at 08:03 AM 0
Share

So you're looking for a manual for the Unity editor?

3 Replies

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

Answer by Tanshaydar · Oct 16, 2014 at 12:30 PM

You are basically asking how Photoshop does its thing and complaining about there are tutorials for "How to do X in Photoshop", as it is clearly what's necessary for users, while former is just a "stats for nerds" thing.

While I do not think you'd find such a document on Unity, you can go through manuals to see if they included such an information. For example, Unity explains how view frustum works.

Your example requires a little bit of a programming knowledge. Note that Unity works in a pattern oriented fashion instead of object oriented, meaning it's component based. An empty gameobject comes with Transform component. Everything else is a component, which can be referenced from each other; i.e. a Hinge is not a gameobject (or an object for that matter) but a component, which can be added to any gameobject, but also requires RigidBody component.

Where you are wrong is you are trying to drag the script file inside your object with Bar component. Your script file is a physical file on harddisk, Unity does not convert it to a gameobject. BUT, you can add the said script to your gameobject as a component.

Unity checks that gameobject IF it includes the required component. That's a very easy check, any beginner can write a code for that, and a complex software like Unity can pretty much handle it in any case.

Another thing to mention is that a variable and a gameobject are different things. You can add a component to a gameobject, but you cannot add a gameobject to a gameobject, unless it is a variable.

So, you should probably start here: http://docs.unity3d.com/Manual/TheGameObject-ComponentRelationship.html

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 MackTuesday · Oct 16, 2014 at 04:01 PM 0
Share

Thanks for trying. I mean it. $$anonymous$$aybe my request isn't realistic. shrug

avatar image Jigglebizz · Mar 29, 2016 at 11:42 AM 0
Share

@Tanshaydar, I think you've half interpreted (and unnecessarily dismissed) the value of this question. Implementation details of particular features of the engine aren't what's of interest. A view frustum exists in all 3D engines. It's very well-documented, and you'd encounter it in any intro to 3D graphics course at a university. I think OP's intention is to find a map of the object model that Unity, specifically, uses. For example, if you are writing scripts for the music software Ableton, they provide a full map of all objects' relationships ( https://docs.cycling74.com/max5/refpages/m4l-ref/m4l_live_object_model.html )

I've also found that Unity's documentation is a bit lacking in this area. An object model is infinitely helpful when planning a set of Best Practices, which aside from a number of lectures and blog posts from various developers, I've yet to find a prescribed methodology. It's confusing, and begs me to ask the question "What, exactly, was this engine designed to do?"

I'd also like to shed some light on a claim you made - you mentioned that Unity is "pattern oriented ins$$anonymous$$d of object oriented." While it is true that various design patterns have been used in the design of this software (as they are with most software designs), it is untrue that this is in opposition to an object model. Your comment implies that Unity has no object model. Patterns are just commonly-used compositions of objects. They are not opposing ideas.

I, too, wish there was a map that shows the end-to-end relationships between input, feedback, and the objects and patterns that support the engine in general. An API is helpful for implementation details, but a map of the O$$anonymous$$ helps me to plan my own patterns and objects.

avatar image
0

Answer by feiting · Feb 12, 2016 at 06:13 PM

I believe you simply want to learn how to write a game engine, and define shaders. I know this much, because my friend has basically written a game engine similar to Unity3d, but it was the 3rd game engine he wrote. Unfortunately, Game Engines are as complex as your question, hah, depending on what you want to do. I, myself, am a self-taught programmer who happens to have a mentor (that guy, an amazing senior programmer at Smashing Ideas) and at this point, I have taken his advice, read books, but still not dove into game engines. I still have a lot to learn, but I think, this answer is the best one so far, at least until Unity says what philosophy is behind their engine's inner structs

Comment
Add comment · 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
0

Answer by meat5000 · Mar 29, 2016 at 11:51 AM

If you are Intermediate or above in your programming skills you can use a program called ILSpy.

Open the Unity/Mono dlls with this program and all the internal methods will be revealed. There is no better way to see how Unity Internals work.

https://www.google.co.uk/search?q=unity+ilspy&ie=utf-8&oe=utf-8&gws_rd=cr&ei=JWz6VpDzBcXyPN2vsdAE#q=unity+ilspy+internals

Comment
Add comment · 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

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

33 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

A node in a childnode? 1 Answer

Can kids use unity? 5 Answers

Practice projects for unity? 1 Answer

Best Place For An Absolute Beginer To Start Learning Unity 2 Answers

Instantiating a MonoBehavior Class at runtime and pass it a normal Class 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