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
2
Question by x-stuff · Jun 15, 2012 at 04:50 PM · scalingdynamic batchingcustom shader

Mark object do not batch it dynamic

Hi, I have a problem. In my game I'm firing a bullets which are just planes rotated up on camera, and scaled with a distance. The problem is in scaling, i want to do it using a custom shader (it's easy to scale in vertex program, just multiplying object space coordinates) BUT! so as i use a prefab on my bullets (same mesh, same material) unity batched it! and so i have a completely different object space coordinates in vertex program

How can I mark object, something like "do not batch" or whatever, so that unity will not batch my bullets.

PLEASE! DO NOT OFFER Me using a transform.localScale, or something like, I want to scale from my shader!

Just tell me, if exist some way I can switch off dynamic batching on objects what i want.

AND DO NOT OFFER Me switch off dynamic batching in player settings.

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

3 Replies

· Add your reply
  • Sort: 
avatar image
5

Answer by GearKlik · Jan 22, 2016 at 01:15 PM

Sorry to resurrect this thread, but for future wanderers you can do this now per shader by adding "DisableBatching" = "True" to the tags

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 Alejandro-Martinez-Chacin · Sep 07, 2021 at 08:08 PM 0
Share

Reviving this. Was just trying this to fix a bug, I'm quite confident I have used this before but it might not be working anymore. Android build, DisableBatching = True for shadow caster pass, since I'm doing vertex animation from the pivot of the object. It doesn't work, shadows fly around as that pivot center is lost with Dynamic Batching.

avatar image
0

Answer by Jessy · Jun 15, 2012 at 06:39 PM

No, there's nothing like what you're asking at present. You'll have to get creative, like redundantly storing your positions in another vertex attribute.

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 x-stuff · Jun 16, 2012 at 10:48 AM 0
Share

Oh, great thanks it's really helpful =)

avatar image
0

Answer by jamesk5 · Sep 12, 2016 at 11:38 PM

Why don't you adjust the material via script. I think dynamic batching requires the use of the property sharedMaterial, and so using the material property will create a copy or something. look it up, it may disable batching.

EDIT: oh wow didn't realize this thread was so old.

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 tanoshimi · Sep 13, 2016 at 05:55 AM 1
Share

Old and, more importantly, solved :) The solution is to set "DisableBatching" = "True" in the shader (although this wasn't possible when the question was first asked).

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

7 People are following this question.

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

Related Questions

RectTool scale in both direction,RectTool scale in both directions 0 Answers

Accidentally did 'something' and now positioning is all out of whack (canvas, camera, scaling?) 0 Answers

Outline Objects and show even if Obstructed. 1 Answer

Batching objects problem 1 Answer

Dynamic batching is not done. 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