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 Karsnen_2 · Nov 24, 2012 at 08:07 AM · c#iosdrawcalls

[Solved] How to do one draw call out of a rotating coins?

Hello,

I have coins spread out on the level. Now the coin has polygons and the coins belong to the same prefab. Now whenever I use the coin it recognizes as single draw call.

I am avoiding static batching here as the coins are rotating on Y axis.

My target here is to use as many coins as possible on the level and they have to just give one draw call. When the collider interacts with the coin they disappear and as level loads they appear.

Is it possible? Your help is appreciated.

thank you & regards,

Karsnen.

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 Fattie · Nov 24, 2012 at 08:40 AM 0
Share

what is this? 2D ? if so just use 2DToolkit and it's all done in one draw call

avatar image Karsnen_2 · Nov 24, 2012 at 04:29 PM 0
Share

Fattie -> no it is a 3D.

3 Replies

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

Answer by Karsnen_2 · Nov 25, 2012 at 01:12 PM

FInally I did find out a solution.

Lets say that we have numerous coins scattered around the environment and all the coins have a mesh and they rotate by themselves on Y axis.

I have two scripts.

  1. CoinManager.cs

  2. CoinReceiver.cs

I create delegate and event system. I declare it public and the event as a static on the CoinManager.cs script. For the coin to rotate, generate a Quaternion with Y angle rotating. Now delegate passes this Quaternion parameter.

On the CoinReceiver.cs, I use OnEnable and OnDisable methods to activate and deactivate receiving the events. I have a method which would HandleTheEvent(Quaternion Q), which just assigns the quaternion to this.transform.rotation.

Hence with this, I was able to achieve complete dynamic batching no matter how many coins to have or you multiply during runtime. But the downside of this method is that, the coins will all rotate at the same angle.

I wish to attach the scripts in the future, as I do not have it with me right now. I hope it helps for anyone who is looking for this answer. If not kindly buzz me.

Later.

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
1

Answer by Griffo · Nov 24, 2012 at 05:39 PM

you can setup a Occlusion Area (Pro Only) to help cut the count down

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 Karsnen_2 · Nov 26, 2012 at 07:32 PM 0
Share

Hmm Will try it.

avatar image
1

Answer by sirival · Nov 25, 2012 at 01:36 PM

Maybe you will find this link useful http://answers.unity3d.com/questions/36050/why-isnt-dynamic-batching-working.html

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

13 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

Related Questions

The name 'Joystick' does not denote a valid type ('not found') 2 Answers

Disable JIT compilation in the Editor (Enable Full-AOT mode) 0 Answers

What is the best way to understand code in a project with null documentation? 2 Answers

Multi Touch Drag Screen To Move Player? 1 Answer

How Can I Generate a Thumbnail from the Screen? 2 Answers


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