Hi everyone,
I have a big issue with DepthOfField34. I try to access the values of DepthOfField (attach to one of my camera) to change them dynamically in a C# script. Problem : Unity don’t know what is DepthOfField34.
I access DepthOfField like this : “var dof = Camera.main.GetComponent(DepthOfField34);” or “var dof = Camera.main.GetComponent();”.
Just with this, i got an error : “The name DepthOfField34 does not exist in current context”.
Okay, i try just : “DepthOfField34 dof;”
I got : “The type or namespace DepthOfField34 could not be found …”
I check my referencies in MonoDevelop and my Assembly-CSharp project got a reference to Assembly-UnityScript, where DepthOfField34 is.
Of course, i got a pro version and of course i import the Image Effect package to my project.
Anyone get this problem ?
Thanks a lot.
Camera.main.GetComponent<"DepthOfField34">;
I believe that would work…
Not at all, parse error.
I just see something : When i build Assembly-UnityScript in MonoDevelop, i get 2 errors. “Could not find ‘C:\Documents’”, in fact it cant find it because this folder dont exist.
May be it’s because i get the project from another PC and Assembly-UnityScript just keep the path of the previous machine… How can i change that ?
It’s not an issue with GetComponent. If it were he would be getting a NullReference error not a missing declaration.
My guess is you need to re-import the package so it can resolve the path issues that you’re seeing.
Already done, nothing changed…
I try to fix that for hours, but i think the entire workspace is like broken, my scene is huge i dont want to re-import everything into a new project…
When i start a new project and try access DepthOfField34 : It works perfectly.
In my project (the problem one), the Auto-completion of MonoDevelop find DepthOfField34 normally, but on compile “I dont know what is this”… what the … ? Oo
It seems like my Assembly-UnityScript is here, MonoDevelop see it, but Unity don’t. If someone got the same story or have a solution, i’m still open…
Thanks a lot 