yasirkula / UnityNativeShare

A Unity plugin to natively share files (images, videos, documents, etc.) and/or plain text on Android & iOS
MIT License
891 stars 131 forks source link

Namespace error #93

Closed volkerku closed 3 years ago

volkerku commented 3 years ago

I'm getting this error when I try to build for iOS after updteing to the new version (1.6)

Assets\Plugins\NativeGallery\NativeGallery.cs(6,7): error CS0246: The type or namespace name 'NativeGalleryNamespace' could not be found (are you missing a using directive or an assembly reference?)​

Any idea?

PS, I'm also using ScreenshotHelper Plus and NativeShare which I updated as well. Hard to tell, but I think they are related and use commong libraries, right?

yasirkula commented 3 years ago

You can try deleting NativeShare folder and reimporting it from scratch.

P.S. No, try deleting NativeGallery folder and reimporting it from scratch.

volkerku commented 3 years ago

Yes tried that, but same error, Tried from asset store and the unitypackage on github. I was deleting the Assets/Plugins/NativeShare foldr.\er.

volkerku commented 3 years ago

Ok tried that. Deleted and reimported NativeGallery (and NativeShare just to make sure), but I'm stil getting the same error. Tried building iOS and Android, but no luck.

yasirkula commented 3 years ago

I really don't know why you are having this issue, let alone on both Android & iOS. On Android, these classes belong to NativeGalleryNamespace namespace and on iOS, these classes belong to NativeGalleryNamespace. If you are using some sort of custom build system, try using Build & Run instead. In the worst case, try importing the plugin to an empty Unity project and see if the issue can be reproduced.

paulinevivier commented 3 years ago

@volkerku did you manage to solve this issue? I'm facing the same problem. It's working fine in an empty project though.

yasirkula commented 3 years ago

Try creating the following script:

namespace NativeGalleryNamespace
{
    public class MyDummyClass { }
}