Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 cecilcruxis · Mar 18, 2016 at 10:07 PM · physics settings

Way to find Default Behavior Mode of Physics through Script

I was wondering if anyone knew of a way to check by script what unity's default behavior mode is for physics.

The reason for asking I want to make a a* system that reads what the current behavior mode of physics is and create the grid on the respectful world axis.

Thank you to anyone that takes there time to answer this.

Comment
Add comment · Show 2
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 Bunny83 · Mar 19, 2016 at 04:06 AM 0
Share

Uhm, i have no idea what you mean by "Behavior $$anonymous$$ode". Even if there is something like a "physics behaviour mode", what would that "mode" control and how would it affect a search algorithm?

Sorry, but this question is not clear at all and needs clarification. Please edit your question and be more precise what you mean.

avatar image cecilcruxis · Mar 19, 2016 at 02:14 PM 0
Share

alt text

Here is an image of what I mean

defualt-behavior.png (31.5 kB)

1 Reply

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

Answer by Bunny83 · Mar 19, 2016 at 05:04 PM

That has nothing to do with physics at all. This is a project specific setting which changes how the editor works. That's why you find this setting in

 Edit --> Project Settings --> Editor 

and not

 Edit --> Project Settings --> Physics / Physics2D

Whether you develop your game in the 2d editor mode or 3d has no influence on how the game actually works. It just simplifies the development a little bit. Also everything you create is automatically preconfigured for the "space" you have selected. You can develop a 3d game in 2d mode (which just gives some problems as the whole UI is designed for 2d but it's still possible) and you can develop a 2d game in 3d editor mode.

As for physics, both physics systems can be used at runtime. You don't need to switch something. Both can even run at the same time. They are independent from each other.

If you just want to determine the mode the Unity editor is currently in you can use

 UnityEditor.EditorSettings.defaultBehaviorMode

in an editor script. It returns an enum value of EditorBehaviorMode. It seems they are still lacking proper documentation of this enum and the EditorSettings class in general (as it's completely missing in the docs)

This class can't be used at runtime since it belongs to the Unity editor namespace. This namespace is only available inside editor scripts since it provides things that belong to the editor application which of course isn't shipped with your built game.

Comment
Add comment · Show 1 · 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 cecilcruxis · Mar 19, 2016 at 06:59 PM 0
Share

Thank you that code line helps a lot. I know it doesn't have to do with physics behavior. I am sorry if my question was clear. The main reason I had this question is I wanted to have a script read your default behavior of the editor is and draw an a* path grid on based on the correct perspective. So if the behavior is 2D draw it on the axis used by 2d sprites and if it is 3d draw the grid on the perspective of the 3d world.

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Ignore Collision In Physics settings, Doesn't Work?? 1 Answer

Make GameObject Independent of Editer Physics 1 Answer

Unity Car Tutorial (alt physics) building for web incorrectly. 0 Answers

Scaling down my model or scaling up the gravity 3 Answers

Is it possible to use layers with physics? 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