public void OnValidate() { RefreshInfo(); string path = GetProjectPathInUnity() + "/package.json"; if (File.Exists(path)) { Utility_PackageJson pack = UnityPackageUtility.GetPackageInfo(path); if (pack != null) { m_namespaceId = pack.GetNamespaceID(); } } }
public static string CreateBasicDefaultOnFrom(Utility_PackageJson packageInfo, GitLinkOnDisk gitLink) { string text = "# Welcome to: " + packageInfo.displayName + " \n"; text += "Never used a package before ? \n"; text += "You don't understand how to use this git repository ? \n"; text += "May be you should stop now and learn the basic: \n"; text += "https://eloistree.page.link/hellopackage \n"; text += " \n"; text += "You know how the music work ? \n"; text += "Here is the copy past link of this project: \n"; text += "`\"" + packageInfo.GetNamespaceID() + "\":\"" + gitLink.GetUrl() + "\"` \n"; text += " \n"; text += "In hope that this code help you. \n"; text += "Kind regards, \n"; text += Application.companyName; return(text); }
public bool IsPackageDefined() { return(m_packageInfo != null && !string.IsNullOrWhiteSpace(m_packageInfo.GetNamespaceID())); }