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 Twayne · Nov 20, 2010 at 05:44 AM · meshparticleemitter

How can I solve my Mesh Particle Emitter problem?

I have been helped to find out that i can add an MPE with script

var pe : ParticleEmitter = wallChild.AddComponent("MeshParticleEmitter") as ParticleEmitter;

also I have learned that not all variables are exposed to scripting(I need Interpolate Triangles and the Normal Velocities). I am creating different shaped and sized meshes on the fly and want to add the MPE to the mesh. On the bright side, the settings I want from the MPE are always the same, just not the default settings. So can I do any of these things?

  • Adjust the default settings of MPE when AddComponent is called, it would load the MPE with Interpolate Triangles ON and The Min and Max Normal Velocities to 1 - like the Unity MPE page suggests you set!

  • I have an MPE on a gameobect in the game with the correct settings. Can I copy the MPE settings from the base mesh to my MPE settings on the created mesh?

  • Have a prefab with the correct MPE in it and Instantiate it and add to the created mesh. I am trying to do this with little luck as shown.

    var flameFire : Transform = Instantiate(FloorScript.FlameStuff, childWall.position, 
       Quaternion.identity) as Transform;
    flameFire.parent = wall.transform.Find("Cube");
    

    but something is wrong the MPE doesn't take the shape of the mesh of "Cube".

    Thank you.

    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
    0
    Best Answer

    Answer by Eric5h5 · Nov 20, 2010 at 06:53 AM

  • No, you can instantiate a prefab that has the settings you want.

  • No, see 1.

  • Assigning a parent won't do anything; you assign a mesh to a mesh particle emitter. But you have to do it indirectly by assigning the mesh to the attached MeshFilter component.

    GetComponent(MeshFilter).mesh = desiredMesh; // The ParticleEmitter component will use this mesh
    
    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 Twayne · Nov 21, 2010 at 03:18 AM 0
    Share

    Thanks again Eric5h5.

    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

    How do I access the extra variables in a Mesh Particle Emitter? 1 Answer

    Particle System (shuriken) with mesh particles, change color? 0 Answers

    How does one access the mesh variable of a Mesh Particle Emitter? 2 Answers

    Problems with mesh particle emitter 1 Answer

    Particle Effect (Shuriken) mesh emitter how to? 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