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 tormentoarmagedoom · Apr 05, 2018 at 10:38 PM · savetrailrenderertrail

Is possible to save a trail rendered to load again after?

Good day.

I'm making a project where the player object render a trail with trail renderer component. It is configured to Inifinite time, so it marks where the player has been all time. Sometimes i use

 TrailRenderer.Clear()

To delete it and start the trail again. But i want to know if is possible to save a trail once has been rendered, and later, load it again and "print" it again on the scene, as a new trail , or maybe as sprite, or i don't know.. there is any way to do it?

The idea is to save the last 2 or 3 trails then had a infinite time, so the length is unknown.

Thanks in advance! :D :D

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

Answer by Koyemsi · Apr 06, 2018 at 08:04 AM

Hi, It seems that the Trail Renderer has a GetPositions() method, like has the LineRenderer. So you should be able to retrieve the positions (the points which define your trail) and store them in an array. You also may want to store them in an external file, i.e. a CSV or XML file.

https://docs.unity3d.com/ScriptReference/TrailRenderer.GetPositions.html

Comment
Add comment · Show 4 · 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 tormentoarmagedoom · Apr 06, 2018 at 08:21 AM 0
Share

Good day @$$anonymous$$oyemsi !

mmm interesting, so with all points stored i should be able to render a ne line with LineRenderer!

Thanks for your answer, i will investigate to find the solution.

avatar image Koyemsi tormentoarmagedoom · Apr 06, 2018 at 09:07 AM 1
Share

$$anonymous$$y pleasure. Yes it is the idea, as you cannot SetPositions for a Trail. But with a Line using the same $$anonymous$$aterial as your Trail, it should theoretically be possible. Let me know if that works. By the way, a personal question : your name "tormentoarmagedoom" sounds very metal to me. Are you a metal freak (I'm one) ?

avatar image tormentoarmagedoom Koyemsi · Apr 06, 2018 at 09:50 AM 0
Share

hahaha, well my normal nickname is Armagedoom, but in some games/servers is taken and then i Use Tormento. I dont remeber why i used both togatherhere :D

And yea, Armageddon from Gamma Ray is one of my favourite songs :D :D

Show more comments

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

79 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

Related Questions

Trail Render not become visible during game play 0 Answers

Will disabled trails still get generated? 1 Answer

Are trail renderers still lacking dynamic batching? 0 Answers

Detect closed loop in TrailRenderer and get gameObjects inside 2 Answers

How to make this trail? 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