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
0
Question by Thedungonmaster · Nov 10, 2016 at 03:41 PM · error messagecompiler

how would i fix the compiler errors

 using System;
 using UnityEngine;
 using UnityStandardAssets.ImageEffects;
 
 
 [ExecuteInEditMode]
 public class ColorGradingProperties : ObjectProperties {
     private Tonemapping toneMapping;
     //public Light _moon;
     public Gradient exposure;
     //public Gradient exposure, brightness,contrast,saturation;
     public Vector2 exposure2 = new Vector2(1, 2), brightness2 = new Vector2(1, 1), contrast2 = new Vector2(1, 1.1f), saturation2 = new Vector2(0, 1);
     public float crossFade;
 
 
     public new void Awake() {
         toneMapping = GetComponent<Tonemapping>();
         base.Awake();
     }
 
     public override void Run() {
         if (!enabled) return;
         UpdateTone(time);
     }
 
 
     public void Update() {}
 
     //public new void OnEnable() {
     //    if(debugLogness)Debug.Log("ColorGrading OnEnable");
     //    UpdateTone(time);
     //    base.OnEnable();
     //}
 
     private void UpdateTone(float timeIn) {
         if (debugLogness) Debug.Log("ColorGrading UpdateTone: time:" + timeIn + " crossFade:" + crossFade + " :" + toneMapping, this);
         if (toneMapping == null) toneMapping = GetComponent<Tonemapping>();
         var crossTo = 0f;
         var crossFade2 = crossFade;
         if (crossFade < 0) {
             crossTo = 30;
             crossFade2 = -crossFade;
         }
         if (exposure != null) toneMapping.exposureAdjustment = Mathf.Lerp(Mathf.Lerp(exposure2.x, exposure2.y, exposure.Evaluate(timeIn).r), crossTo, crossFade2);
         if (exposure != null) toneMapping.Brightness = Mathf.Lerp(brightness2.x, brightness2.y, exposure.Evaluate(timeIn).r);
         //if (exposure != null) toneMapping.Brightness = Mathf.Lerp(Mathf.Lerp(brightness2.x, brightness2.y, exposure.Evaluate(timeIn).r), Mathf.Lerp(brightness2.x, brightness2.y, exposure.Evaluate(timeIn).r)*0.0f, Mathf.Max(0, crossFade*2f - 0.5f));
 
         if (exposure != null) toneMapping.Contrast = Mathf.Lerp(Mathf.Lerp(contrast2.x, contrast2.y, exposure.Evaluate(timeIn).r), 1f, crossFade);
         if (exposure != null) toneMapping.Saturation = Mathf.Lerp(saturation2.x, saturation2.y, exposure.Evaluate(timeIn).r);
     }
 }

this is what was there and i attempted to fix it but after i did it continued to say there were errors these were the errors Assets/Scripts/Properties/ColorGradingProperties.cs(45,51): error CS1061: Type UnityStandardAssets.ImageEffects.Tonemapping' does not contain a definition for Brightness' and no extension method Brightness' of type UnityStandardAssets.ImageEffects.Tonemapping' could be found (are you missing a using directive or an assembly reference?)

Assets/Scripts/Properties/ColorGradingProperties.cs(48,51): error CS1061: Type UnityStandardAssets.ImageEffects.Tonemapping' does not contain a definition for Contrast' and no extension method Contrast' of type UnityStandardAssets.ImageEffects.Tonemapping' could be found (are you missing a using directive or an assembly reference?)

Assets/Scripts/Properties/ColorGradingProperties.cs(49,51): error CS1061: Type UnityStandardAssets.ImageEffects.Tonemapping' does not contain a definition for Saturation' and no extension method Saturation' of type UnityStandardAssets.ImageEffects.Tonemapping' could be found (are you missing a using directive or an assembly reference?

Comment
Add comment · Show 2
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 Suddoha · Nov 10, 2016 at 04:10 PM 0
Share

The type 'UnityStandardAssets.ImageEffects.Tonemapping' simply does not have such properties. Where did you get this script from? Or what did you change when you tried to fix in on your own?

avatar image hexagonius Suddoha · Nov 10, 2016 at 06:51 PM 0
Share

you try to access the three properties Brightness, Contrast, Saturation, which seem to not exist in the class Tonemapping. If you type in "tonemapping." and then hit C$$anonymous$$D + Space, autocompletion should help you finding out what you can and can't do with the class unless you wrote it yourself.

0 Replies

· Add your reply
  • Sort: 

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

[Ubuntu 19.10] Blank error at project start 2 Answers

,Cannot Enter Play Mode when I download assets from assets store 1 Answer

how do i fix the compiler errors on unity 5? i have tried everything there is to try. 0 Answers

Error: Cannot start process because a file name had not been provided 0 Answers

I'm getting an error o != NULL UnityEditor.DockArea:OnGUI() 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