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 /
  • Help Room /
avatar image
1
Question by ChronoGames · May 03, 2016 at 07:48 PM · image effectsdevelopmentaccessing scripts

How to alter Vignetting value on Vignette and Chromatic Aberration via C# Script

I'm trying to change the value of "Vignetting" in the Image Effects script: Vignette and Chromatic Aberration.

For some reason, it's acting like the parameter does not exist or that I do not have access to it.

I've tried some other solutions but with no luck. http://answers.unity3d.com/questions/1018636/how-can-you-access-and-change-the-values-of-the-vi.html http://answers.unity3d.com/questions/582509/calling-vignetting-js-shader-from-c-code.html

Noteworthy Code:

 using UnityStandardAssets.ImageEffects;
 vis = GetComponentInChildren<VignetteAndChromaticAberration>();
 vis.Vignetting = value; // <--- Doesn't Work

The error says "there is no definition for Vignetting" in the component.

Anyone have any ideas?

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
2

Answer by ChronoGames · May 04, 2016 at 01:10 AM

If anyone else finds themselves here, the solution is to edit the "intensity" instead. It's on a scale from 0 to 1.

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 austinbranion · Nov 24, 2016 at 11:33 AM 0
Share

@ChronoGames thanks! I found myself here looking for answer to this question, and your solution worked nicely :)

avatar image
0

Answer by rrabassa · Mar 01, 2017 at 02:33 PM

I can't seem to get this to work... No errors but no change either:

         _fps.GetComponentInChildren<VignetteAndChromaticAberration> ().intensity = 10;
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 maniacanshul · Apr 17, 2017 at 12:02 PM 0
Share

@$$anonymous$$abassa Its between a scale of 0-1. 10 would simply clamp it to 1. Try putting values between 0 and 1 such as 0.1 for 10% effect.

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

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Add tint to a partially transparent sprite 0 Answers

way to make boat rotate and move at the same time with a rigidbody and addforce ? 1 Answer

Pressing play removes components 0 Answers

Image Effects missing from components menu? 0 Answers

How to flip camera on a Y-axsis ? 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