Import 2D Level

This commit is contained in:
2026-04-30 00:53:30 +02:00
parent c67979c7cf
commit 5797038baf
479 changed files with 430785 additions and 0 deletions
@@ -0,0 +1,14 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c3420f187011c1a43824ca0d4c88d6c6, type: 3}
m_Name: PublishCriteria
m_EditorClassIdentifier:
@@ -0,0 +1,69 @@
using System.Linq;
using Unity.Play.Publisher.Editor;
using UnityEngine;
namespace Unity.Tutorials
{
/// <summary>
/// Contaisn all the callbacks needed for the Build And Publish tutorial
/// </summary>
[CreateAssetMenu(fileName = "PublishCriteria", menuName = "Tutorials/Microgame/PublishCriteria")]
class PublishCriteria : ScriptableObject
{
static PublisherWindow publisherWindow;
public bool IsNotDisplayingFirstTimeInstructions()
{
if (!IsWebGLPublisherOpen()) { return false; }
return (!string.IsNullOrEmpty(publisherWindow.CurrentTab) && publisherWindow.CurrentTab != PublisherWindow.TabIntroduction);
}
public bool IsUserLoggedIn()
{
if (!IsWebGLPublisherOpen()) { return false; }
return (publisherWindow.CurrentTab != PublisherWindow.TabNotLoggedIn);
}
public bool IsBuildBeingUploaded()
{
if (!IsWebGLPublisherOpen()) { return false; }
switch (PublisherUtils.GetCurrentPublisherState(publisherWindow))
{
case PublisherState.Upload:
case PublisherState.Process:
return true;
default: break;
}
return !string.IsNullOrEmpty(PublisherUtils.GetUrlOfLastPublishedBuild(publisherWindow));
}
public bool IsBuildPublished()
{
if (!IsWebGLPublisherOpen()) { return false; }
return !string.IsNullOrEmpty(PublisherUtils.GetUrlOfLastPublishedBuild(publisherWindow));
}
public bool AtLeastOneBuildIsRegistered()
{
if (!IsWebGLPublisherOpen()) { return false; }
switch (PublisherUtils.GetCurrentPublisherState(publisherWindow))
{
case PublisherState.Zip:
case PublisherState.Upload:
case PublisherState.Process:
return true;
default: break;
}
int availableBuilds = PublisherUtils.GetAllBuildsDirectories()
.Where(p => (p != string.Empty)
&& PublisherUtils.BuildIsValid(p)).Count();
return availableBuilds > 0;
}
bool IsWebGLPublisherOpen()
{
if (publisherWindow) { return true; }
publisherWindow = PublisherWindow.FindInstance();
return false;
}
}
}
@@ -0,0 +1,17 @@
{
"name": "Unity.2DPlatformer.Tutorials",
"references": [
"GUID:149cad238efed4f53ac932b1e9555356"
],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}