• 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
3
Question by HelpMeForMyProject · Feb 27, 2015 at 11:41 AM · androidjavascriptshadertexturescene

Please Help!!! my LineRenderer Script is not show when bulid on android device

alt text

alt text

Script

public var radius : float = 1.0;

private var theta_scale : float = 0.1; //Set lower to add more points private var size : float = (3.0 * Mathf.PI) / theta_scale; //Total number of points in circle. var c1 : Color = Color.white; var c2 : Color = Color.white; function Start() { var lineRenderer : LineRenderer = gameObject.AddComponent("LineRenderer");

lineRenderer.material = new Material(Shader.Find("Particles/Additive")); lineRenderer.SetColors(c1, c2); lineRenderer.SetWidth(0.1, 0.1); lineRenderer.SetVertexCount(size);

var i : int = 0;

for(var theta : float = 0; theta < (2.0 Mathf.PI); theta += 0.1) { var x : float = radius Mathf.Cos(theta); var z : float = radius * Mathf.Sin(theta); var pos : Vector3 = new Vector3(x, 0, z);

lineRenderer.SetPosition(i, pos); i += 1; }

}

11001723-803338626419246-7975645001494206492-n.jpg (59.7 kB)
10404493-803338639752578-577368268325240306-n.jpg (16.2 kB)
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
5

Answer by tanoshimi · Feb 27, 2015 at 11:43 AM

My guess would be that you're not including the Particles/Additive shader in your build.

Go to Edit -> Project Settings -> Graphics and make sure it's listed under "Always Included Shaders".

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 Scorsho · Dec 07, 2015 at 08:08 PM 0
Share

I owe you my sanity! Thank you~

avatar image lipemon1 · May 29, 2017 at 04:57 PM 0
Share

Nice move! Work fine for me after do that.

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.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

why the colors are broken on my mobile phone? 1 Answer

Black Texture Glitch After Latest Unity Update? 1 Answer

Transparency artifacts android 0 Answers

I can't create a new scene??? 0 Answers

Wand Magic Tool 0 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges