facebook-unity-sdk 6.1 - unity3d

I am getting this error after importing the facebook sdk on my unity 4.6.1 , anyone can help me with a solution on this?
Assets/Facebook/Scripts/IOSFacebookLoader.cs(6,42): error CS0246: The type or namespace name `FB' could not be found. Are you missing a using directive or an assembly reference?

I am not sure but I think you are missing the line "using Facebook.MiniJSON" at the top of your code.

An error in another script someplace in an existing project could be preventing compilation of the Facebook .cs files, which would make the FB class inaccessible.
Is this in a new Unity project (for testing) or an existing Unity project? Have you tried following the "Get Started with Facebook Unity SDK" tutorial to set up the Interactive Console scene in the Facebook console?

Related

Unity "are you missing a using directive" on a using directive

I run into this problem every few months and it annoys the crap out of me. I do not understand what causes this or how I seem to keep fixing it. But every once and awhile I will update Unity, switch git branches or something and then all of a sudden Unity can not find packages imported from GitHub.
I can see that the libraries are in my unity packages folder but Unity can not see them. Here you can see MyBox and xNode are in my Unity Packages folder.
The funny thing about the error, highlighted below, is that the line of code it is complaining about possibly not having a using directive for xNodeEditor... is a using directive for xNodeEditor...
Here is the error I am getting for that line. "Assets\Editor\xNode\DialogueNodeEditor.cs(2,7): error CS0246: The type or namespace name 'XNodeEditor' could not be found (are you missing a using directive or an assembly reference?)"
I don't think this is a namespace issue as I don't use namespaces. I am sorry I can't provide more information I do not know what I did recently to my project before this started again.
Not sure if this is relevant but here is my GameAssembly where you can see MyBox and xNode are present.
As I stated in the comments, closing Unity before switching branches seems to help minimise how much Unity freaks out.
After, if VS is no longer recognising libraries in your code / Unity's built in scripts it may have to do with not opening the SLN file.
Here is a part of a tutorial I wrote as this problem occurred on the school computers.
If VS says "Miscellaneous Files" just under the scripts name tabs it has not properly opened the Unity files. Fix this by closing VS and opening by clicking in Unity "Assets" then "Open C# Project" it may prompt you to specify a SLN file.
Even if VS does not say the files are misc it seems to help to open via assets rather than double clicking a script.

Missing namespace 'BaseMeshEffect' in Unity

I'm getting an error CS0246 saying the file 'BaseMeshEffect' could not be found. But the same project in my colleagues computers work fine. Where can I find this file?
Assets/_UI/Packages/Gamestrap UI/Effects/ShadowEffect.cs(11,33): error CS0246: The type or namespace name `BaseMeshEffect' could not be found. Are you missing a using directive or an assembly reference?
Thanks
It sounds like you're using a different version of Unity than your colleagues. Update to Unity 5.2.
Reference
Hey I just found this thread, I'm one of the creator of Gamestrap UI and I saw you were having an issue with it, Unity upgraded it's version and changed a lot of stuff in the effects section, I've already uploaded a new version of the asset so it can work with the 5.2 version and the older versions as well, you just have to redownload the asset and it should work. Hope you are liking Gamestrap!

Unity C#, Using LINQ on multiple target platforms

Is there any way in Unity of defining resources for a particular platform that should be ignored by Unity when on another build platform?
I like to use LINQ, but when my target is the Web Player I get the error message:
error CS0234: The type or namespace name `Linq' does not exist in the namespace `System.Xml'. Are you missing an assembly reference?
I can solve this by copying the System.Xml.Linq.dll to my Plugins folder, and now Unity knows about LINQ.
Then when I switch target to Android I get the error message:
error CS0433: The imported type `System.Xml.Linq.XDocument' is defined multiple times
Which is resolved by deleting System.Xml.Linq.dll from the Plugins folder.
I'd like Unity to ignore System.Xml.Linq.dll when on Android and notice it when on Web Player target.
A solution for getting Unity to see LINQ when on Web Player platform without copying the DLL into the project, would also be fine.
Thanks in advance
there is this in the unity docs:
http://docs.unity3d.com/Manual/PlatformDependentCompilation.html

Building MailCore framework for iOS?

Hello I'm trying to build MailCore framework since two days... it's giving too many errors.
first it was giving 'config.h no such file' error. I downloaded another copy of MailCore and this one is giving two errors
1-target specifies product type 'com.apple.product-type.framework', but there's no such product type for the 'iphonesimulator' platform
2-Internal error occurred while creating dependency graph: ASSERTION FAILURE in /SourceCache/IDEXcode3ProjectSupport/IDEXcode3ProjectSupport-928/Xcode3Sources/XcodeIDE/Frameworks/DevToolsBase/pbxcore/Target.subproj/PBXTargetBuildContext.m:1966
please help me out.. I'm sick of it.
Thanks in advance.
I solved the issue by implementing the instructions exactly what is told here... http://libmailcore.com/...
no need to build framework... just include the files in your project as told by the link I've mentioned and you are done...
I can only speak to that "config.h" error:
Turns out you have to have MailCore in a folder with no spaces in the directory path.
See: https://github.com/mronge/MailCore/issues/35
I moved the folder to /Users/bill/Documents/dev/lib/MailCore and was able to build the project there. Leaving MailCore at that location, I dragged the MailCore.xcodeproj file into my project (located elsewhere on the hard drive) and was able to compile my project.
Would be nice if someone would add this as a warning to to the directions here

Need help with MonoDevelop (solution for iPhone)

i try to make a solution with MonoDevelop, but i have some problems. I try to compile empty project, but there the builder shows:
Building: tusciasProjektas (Debug|iPhone)
Building Solution tusciasProjektas
Building: tusciasProjektas (Debug|iPhone)
Performing main compilation...
Updating CodeBehind files
Updated 1 CodeBehind files
The reference 'System' is not valid for the target framework of the project.
The reference 'System.Xml' is not valid for the target framework of the project.
The reference 'System.Core' is not valid for the target framework of the project.
Assembly 'monotouch' not found. Make sure that the assembly exists in disk. If the reference is required to build the project you may get compilation errors.
Build failed. Argument cannot be null.
Parameter name: path1
My computer is standart, with Intel CPU (not mac), it has Leopard X installed. I also installed framework for this and MonoDevelop. Maybe it's problem that i don't have installed MonoTouchSDK(it's require som user and password, and I can't download it from: http://www.go-mono.com/monotouch-download/monotouch-0.9-20090818-0.pkg ). Is anybody working on that and can help me with this?
It is stated on http://mono-project.com/MonoTouch_Beta that you have to fill out the beta participation form to get the SDK.
The MonoTouch team will send you the details to get started.
Assembly 'monotouch' not found.
You will need the MonoTouch framework to develop using the MonoTouch framework. The first thing you need to do is get that.
Have you followed the "join the beta" link on the project page? That would be a good place to start if you want an account to download it.
http://www.mono-project.com/MonoTouch_Beta