Skip to content

Commit

Permalink
Implement cross-platform Factory in MainMenu (creatures, maps, parts …
Browse files Browse the repository at this point in the history
…and patterns)

PC: Steamworks.NET SDK
Mobile: Steam WebAPI
  • Loading branch information
daniellochner committed Jul 30, 2024
1 parent 8b2f6b3 commit c63b7c2
Show file tree
Hide file tree
Showing 56 changed files with 16,877 additions and 958 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@
using TMPro;
using UnityEngine;
using UnityEngine.UI;
using System.IO;

#if UNITY_STANDALONE
using Steamworks;
#endif

namespace DanielLochner.Assets.CreatureCreator
{
Expand Down Expand Up @@ -45,7 +40,6 @@ public bool IsSharing
public void Setup(string creatureName)
{
nameText.text = name = creatureName;
transform.SetAsFirstSibling();

#if UNITY_STANDALONE
if (EducationManager.Instance.IsEducational)
Expand All @@ -54,17 +48,7 @@ public void Setup(string creatureName)
}
else
{
foreach (PublishedFileId_t fileId in FactoryManager.Instance.Files)
{
if (SteamUGC.GetItemInstallInfo(fileId, out ulong sizeOnDisk, out string folder, 1024, out uint timeStamp))
{
if (Path.GetFileNameWithoutExtension(Directory.GetFiles(folder)[0]) == creatureName)
{
shareButton.gameObject.SetActive(false);
break;
}
}
}
shareButton.gameObject.SetActive(!FactoryManager.Instance.LoadedWorkshopCreatures.Contains(creatureName));
}
#endif
}
Expand Down
Loading

0 comments on commit c63b7c2

Please sign in to comment.