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 colourpixels · Aug 19, 2010 at 02:03 AM · iphone

where to find info on Boundary variable type?

I'm struggling to find any help in the script help on the variable type "Boundary" and what methods and properties it has available. The default penelope joystick script uses it, and I'm trying to write a script that essentially won't let a tap respond if it's inside the joysticks guiBoundary variable.

Could someone point me to where to look? Many thanks Dale

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

1 Reply

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

Answer by jashan · Aug 19, 2010 at 11:08 AM

It's defined up in Joystick.js, so the answer would be "look above":

// A simple class for bounding how far the GUITexture will move
class Boundary 
{
    var min : Vector2 = Vector2.zero;
    var max : Vector2 = Vector2.zero;
}

And that's all there is to it: Two Vector2 attributes, max and min. So all you can do is myBoundary.max and myBoundary.min (assuming "myBoundary" is a variable of type Boundary). That's what I call a simple class ;-)

Anyways, almost missed this myself. That's why I really don't like it that they use JavaScript for these kinds of examples. In C#, with a proper editor (MonoDevelop or Visual Studio), all you have to do is "go to definition", and you'll know where the class was defined (usually by right-clicking on the classname where it is used; also works for methods). Well ... eventually that convenience might come for UnityScript as well (or maybe there already are editors out there that do support it and I'm just making myself look bit ignorant ;-) ).

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 colourpixels · Aug 20, 2010 at 06:02 AM 0
Share

excellent, how could I have missed that! $$anonymous$$uch appreciated and much frustration saved.

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

No one has followed this question yet.

Related Questions

PackTextures works in editor but not on iPad/iPhone ... 2 Answers

Dynamically choosing a high resolution texture at runtime on iOS devices 1 Answer

shadow on plane for iphone 3 Answers

HELP!! OnCollisionEnter is not working when i built it out on IPHONE! 0 Answers

how to load ogg files from documents folder. 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