i'm using native share to share unity game. But i'm facing this error. How to resolve this?
Directories
using UnityEngine;
using UnityEngine.UI;
using GooglePlayGames;
using GooglePlayGames.BasicApi;
using GooglePlayGames.BasicApi.SavedGame;
using System.IO;
using System.Collections;
Native Share Code
private IEnumerator TakeScreenshotAndShare()
{
yield return new WaitForEndOfFrame();
Texture2D ss = new Texture2D(Screen.width, Screen.height, TextureFormat.RGB24, false);
ss.ReadPixels(new Rect(0, 0, Screen.width, Screen.height), 0, 0);
ss.Apply();
string filePath = Path.Combine(Application.temporaryCachePath, "shared img.png");
File.WriteAllBytes(filePath, ss.EncodeToPNG());
// To avoid memory leaks
Destroy(ss);
new NativeShare().AddFile(filePath).SetSubject("Control The Pandemic").SetText("I found this game most attractive!").Share();
}
public void ShareGame()
{
StartCoroutine(TakeScreenshotAndShare());
}
ERROR
CS0246: The type or namespace name 'NativeShare' could not be found (are you missing a using directive or an assembly reference?)


