Adaug proiectul Unity

This commit is contained in:
2026-11-01 23:39:55 +02:00
parent cb14d9d37d
commit 863eac8f2c
23463 changed files with 5412601 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 3ad9b87dffba344c89909c6d1b1c17e1
folderAsset: yes
timeCreated: 1475593892
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
+112
View File
@@ -0,0 +1,112 @@
using UnityEngine;
using UnityEditor;
using System.IO;
using Unity.Scripting.LifecycleManagement;
using UnityEngine.UIElements;
[CustomEditor(typeof(Readme))]
sealed partial class ReadmeEditor : Editor
{
const string k_ShowedReadmeSessionStateName = "ReadmeEditor.showedReadme";
const string k_ReadmeSourceDirectory = "Assets/TutorialInfo";
[OnCodeLoaded]
static void OnCodeLoaded()
=> EditorApplication.delayCall += SelectReadmeAutomatically;
static void SelectReadmeAutomatically()
{
if (!SessionState.GetBool(k_ShowedReadmeSessionStateName, false))
{
SelectReadme();
SessionState.SetBool(k_ShowedReadmeSessionStateName, true);
}
}
static Readme SelectReadme()
{
var ids = AssetDatabase.FindAssetGUIDs("Readme t:Readme");
if (ids.Length != 1)
{
Debug.LogWarning("Couldn't find a readme");
return null;
}
var readmeObject = AssetDatabase.LoadAssetByGUID<Readme>(ids[0]);
Selection.activeObject = readmeObject;
return readmeObject;
}
static void RemoveTutorial()
{
if (EditorUtility.DisplayDialog("Remove Readme Assets",
$"All contents under {k_ReadmeSourceDirectory} will be removed, are you sure you want to proceed?",
"Proceed",
"Cancel"))
{
if (Directory.Exists(k_ReadmeSourceDirectory))
AssetDatabase.DeleteAsset(k_ReadmeSourceDirectory);
else
Debug.LogWarning($"Could not find the Readme folder at {k_ReadmeSourceDirectory}");
var readmeAsset = SelectReadme();
if (readmeAsset != null)
{
var path = AssetDatabase.GetAssetPath(readmeAsset);
AssetDatabase.DeleteAsset(path);
}
AssetDatabase.Refresh();
}
}
public override VisualElement CreateInspectorGUI()
{
var readme = (Readme)target;
VisualElement root = new();
root.styleSheets.Add(readme.commonStyle);
root.styleSheets.Add(EditorGUIUtility.isProSkin ? readme.darkStyle : readme.lightStyle);
VisualElement ChainWithClass(VisualElement created, string className)
{
created.AddToClassList(className);
return created;
}
//Header
VisualElement title = new();
title.AddToClassList("title");
title.Add(ChainWithClass(new Image { image = readme.icon }, "title__icon"));
title.Add(ChainWithClass(new Label(readme.title), "title__text"));
root.Add(title);
//Content
foreach (var section in readme.sections)
{
VisualElement part = new();
part.AddToClassList("section");
if (!string.IsNullOrEmpty(section.heading))
part.Add(ChainWithClass(new Label(section.heading), "section__header"));
if (!string.IsNullOrEmpty(section.text))
part.Add(ChainWithClass(new Label(section.text), "section__body"));
if (!string.IsNullOrEmpty(section.linkText))
{
var link = ChainWithClass(new Label(section.linkText), "section__link");
link.RegisterCallback<ClickEvent, string>((_, url) => Application.OpenURL(url), section.url);
part.Add(link);
}
root.Add(part);
}
var button = new Button(RemoveTutorial) { text = "Remove Readme Assets" };
button.AddToClassList("remove-readme-button");
root.Add(button);
return root;
}
}
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 476cc7d7cd9874016adc216baab94a0a
timeCreated: 1484146680
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
+9
View File
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 8a0c9218a650547d98138cd835033977
folderAsset: yes
timeCreated: 1484670163
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.
+134
View File
@@ -0,0 +1,134 @@
fileFormatVersion: 2
guid: 727a75301c3d24613a3ebcec4a24c2c8
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 0
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 2
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: iPhone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
+19
View File
@@ -0,0 +1,19 @@
using System;
using UnityEngine;
using UnityEngine.UIElements;
public class Readme : ScriptableObject
{
public StyleSheet commonStyle;
public StyleSheet darkStyle;
public StyleSheet lightStyle;
public Texture2D icon;
public string title;
public Section[] sections;
[Serializable]
public class Section
{
public string heading, text, linkText, url;
}
}
+12
View File
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: fcf7219bab7fe46a1ad266029b2fee19
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences:
- icon: {instanceID: 0}
executionOrder: 0
icon: {fileID: 2800000, guid: a186f8a87ca4f4d3aa864638ad5dfb65, type: 3}
userData:
assetBundleName:
assetBundleVariant:
+9
View File
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 5a9bcd70e6a4b4b05badaa72e827d8e0
folderAsset: yes
timeCreated: 1475835190
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,73 @@
:root {
--link-color: blue;
}
.title
{
margin: -2px -6px 14px -15px;
padding: 20px 6px 20px 15px;
flex-direction: row;
align-items: center;
background-color: var(--unity-colors-inspector_titlebar-background);
border-bottom-width: 1px;
border-bottom-color: var(--unity-colors-inspector_titlebar-border);
}
.title__icon
{
max-width: 120px;
max-height: 69px;
}
.title__text
{
margin-left: 16px;
padding: 0;
font-size: 26px;
flex-shrink: 1;
white-space: normal;
overflow: hidden;
}
.section
{
align-items:flex-start;
margin-bottom: 16px;
}
.section__header
{
font-size: 20px;
white-space: normal;
-unity-font-style: bold;
}
.section__body
{
font-size: 14px;
white-space: normal;
}
.section__link
{
font-size: 14px;
white-space: nowrap;
overflow: hidden;
border-bottom-width: 1px;
margin-bottom: -1px;
border-bottom-color: transparent;
color: var(--link-color);
}
.section__link:hover
{
border-bottom-color: var(--link-color);
cursor: link;
}
.remove-readme-button
{
font-size: 13px;
-unity-font-style: bold;
margin: 1px 0px 1px 0px;
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: d2c670ece470f4c4fa6712b8dc28a9bb
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0}
disableValidation: 0
@@ -0,0 +1,3 @@
:root {
--link-color: #7DA0FF;
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 1f902e57f049a7f47986618de93f5ee1
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0}
disableValidation: 0
@@ -0,0 +1,3 @@
:root {
--link-color: #3C28D2;
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 69e7ab73923f93149821ac3a88b84856
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0}
disableValidation: 0