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 DaveA · Feb 13, 2011 at 07:54 PM · shadertextureskyboxparameter

What's the syntax for creating a skybox with a script?

I'm trying to make a skybox dynamically, here's a fragment:

  var skymat = new Material (Shader.Find ("RenderFX/Skybox"));
  var wwwf : WWW = new WWW (params[0]);
  yield wwwf;
  skymat.SetTexture("_Front", wwwf.texture);

I get

Material doesn't have a texture property '_Front'

I've also tried 'Front', 'front', and '_front', and variations including (+z) as well

What gives?

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

2 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by DaveA · Feb 13, 2011 at 08:08 PM

Was looking at shader source as you (PeterG) were answering. All I had to do was find and download the sources and look into that shader. Simple! This UI is not doing us any favors! I don't like obfuscation. That said, the correct syntax is, for anyone following in my footsteps:

"_FrontTex"

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 hg1 · Mar 15, 2011 at 03:46 PM 0
Share

Very helpful - Thanks! (and you probably also need: _BackTex, _LeftTex, _RightTex ... for Skybox)

avatar image
0

Answer by Peter G · Feb 13, 2011 at 08:05 PM

I haven't looked at the skybox shader, but you need to see the shader's property name. That's the first part of a property, it is normally proceeded by an underscore.

Properties {
     _YouNeedThisValue("Ignore This", 2D) = "" {}
}

If you don't know what it is, then I suggest that you download the Unity buit-in shaders off the Resources page, and look it up.

Comment
Add comment · 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

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

Get a UV texture of a models surface 2 Answers

Custom skybox Shader uv issue, skybox texture stretching along one axis. 0 Answers

Blending one material/texture/shader to another 1 Answer

How can I tile a texture on a Skybox? 2 Answers

Texture stretching on one axis. Skybox Shader help. 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