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
0
Question by Oorlfe · May 22, 2019 at 11:03 PM · canvasparticle systemdimensions

Particle system not scaling in canvas with screen dimension change

Hi,

I have a canvas with a bunch of UI objects on it. They all work and they adjust and scale appropriately when I change the screen dimensions. I also have a particle system on a canvas. It is in the UI layer. In my main screen resolution it works great. When I change to iPhone size the particle system adjusts its position, but not to the right spot regardless of where I put the anchors and its scale does not change with the rest. I've tried playing with the scaling mode in the particle system, and I've scoured the internet and tried everything I can think to, but to no avail. Any thoughts?

Thank you for any help.

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 ifurkend · May 22, 2019 at 11:48 PM 0
Share

Have you parented the particle system object to the UI object you want to locate at?

avatar image Oorlfe ifurkend · May 23, 2019 at 04:50 PM 0
Share

Yes, I've tried it as its own object, and with that object parented into another UI Object. No change.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by tormentoarmagedoom · May 23, 2019 at 05:01 PM

Hello.

As far as I know... The particle system gameobject scales, The problem is that the particles spawned still have the same size, so are not scaled.

Must be changed by code.

You cna do something like:

 Particle size = 2*PArticleSystem.transform.localscale.x

So it will scale automatic with all scales.

Bye!

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 Oorlfe · May 23, 2019 at 05:32 PM 0
Share

Thank you for the assistance. I must be misunderstanding something. In trying to make it work I've gotten as far as putting the code onto a script on the particle system object with:

     ParticleSystem.Particle size;
 
     void Awake ()
     {
         size = 2 * ParticleSystem.transform.localScale.x;
     }

but from this I get an, "An object reference is required to access non-static member," error and an, "Cannot implicitly convert type float' to UnityEngine.ParticleSystem.Particle'," error.

with:

     ParticleSystem.Particle size;
 
     void Awake ()
     {
         size = 2 * transform.localScale.x;
     }

I lose the first error, but still get the, "Cannot implicitly convert type float' to UnityEngine.ParticleSystem.Particle'," error.

avatar image tormentoarmagedoom Oorlfe · May 23, 2019 at 09:54 PM 0
Share

$$anonymous$$an i told you the idea not the code... go find how to acess the size of the particles, doa goood reference to the particle, and not multiply by 2... was only an example..

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

119 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 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 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 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

Unity 4.6 UI Canvas width & height 2 Answers

Not-UI elements (3D models/particles) in UI system 1 Answer

Keep Particle System at edge of camera view 0 Answers

Particle System NOT showing in game view DUE to canvas elements 3 Answers

Unity canvas keeps changing dimension and position 0 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