diff --git a/.claude/projects/d--Projet-Perso-Unity-Emberwild/memory/MEMORY.md b/.claude/projects/d--Projet-Perso-Unity-Emberwild/memory/MEMORY.md new file mode 100644 index 0000000..6916b93 --- /dev/null +++ b/.claude/projects/d--Projet-Perso-Unity-Emberwild/memory/MEMORY.md @@ -0,0 +1,4 @@ +# Memory Index + +- [Ashwild Database tool](ashwild-database-tool.md) — Tools ▸ Ashwild ▸ Database: UI Toolkit window to manage items/recipes & generate prefabs. +- [Pickable vestigial NetworkObject](pickable-vestigial-networkobject.md) — old Pickable prefabs carry an unused FishNet NetworkObject; generated ones omit it. diff --git a/.claude/projects/d--Projet-Perso-Unity-Emberwild/memory/ashwild-database-tool.md b/.claude/projects/d--Projet-Perso-Unity-Emberwild/memory/ashwild-database-tool.md new file mode 100644 index 0000000..7cacac8 --- /dev/null +++ b/.claude/projects/d--Projet-Perso-Unity-Emberwild/memory/ashwild-database-tool.md @@ -0,0 +1,24 @@ +--- +name: ashwild-database-tool +description: Custom UI Toolkit editor window (Tools ▸ Ashwild ▸ Database) to browse/create ItemData & CraftingRecipe and generate prefabs. +metadata: + type: project +--- + +A custom editor window lives at `Assets/GAME/Script/Editor/Database/` (namespace +`Ashwild.EditorTools`), opened via **Tools ▸ Ashwild ▸ Database**. Built with UI Toolkit +(first UI Toolkit usage in the project) + a `.uss` stylesheet (`AshwildDatabase.uss`). + +Pieces: +- `AshwildDatabaseWindow.cs` — shell: Items/Recipes tabs, search, list, action bar. +- `ItemEditorView.cs` — custom context-aware ItemData form (cards reveal by type). +- `RecipeEditorView.cs` — visual ingredient list builder ("A + B = Result" equation strip). +- `ItemAssetFactory.cs` / `RecipeAssetFactory.cs` — asset + prefab creation. +- `AshwildUI.cs` — shared styled builders (cards, type badges, type colours). + +**Prefab generation** wraps a chosen source GameObject (model/prefab) as a child of a +generated root: world prefab = Pickable layer + auto-fit BoxCollider + `Pickable` (no +NetworkObject, see [[pickable-vestigial-networkobject]]); hand prefab = Tools layer + +`ToolBehaviour` (mask = Harvestable) + `HeldItemOffset`. Item creation rebuilds the +ItemDatabase automatically. Asset folders: items → `ScriptableObjects/Items/`, recipes → +`ScriptableObjects/Recipes/`, world prefabs → `Prefabs/Pickable/`, hand prefabs → `Prefabs/Tools/`. diff --git a/.claude/projects/d--Projet-Perso-Unity-Emberwild/memory/pickable-vestigial-networkobject.md b/.claude/projects/d--Projet-Perso-Unity-Emberwild/memory/pickable-vestigial-networkobject.md new file mode 100644 index 0000000..a0df23f --- /dev/null +++ b/.claude/projects/d--Projet-Perso-Unity-Emberwild/memory/pickable-vestigial-networkobject.md @@ -0,0 +1,24 @@ +--- +name: pickable-vestigial-networkobject +description: Existing Pickable prefabs carry an unused FishNet NetworkObject; the canonical generated prefab omits it. +metadata: + type: project +--- + +The hand-authored Pickable prefabs (e.g. `Prefabs/Food/Pickable/Raw Steak.prefab`, +`Prefabs/Pickable/Tools/axe01.prefab`) still carry a FishNet `NetworkObject` component, left +over from a pre-refactor design. + +**Why it's dead:** `Pickable` now derives from `WorldObject` (not `NetworkBehaviour`), and +`PickableRegistry.SpawnDropVisual` creates drops with a plain `Instantiate(item.WorldPrefab,…)` +— a local visual, never a network spawn. The registry syncs only ids/drop records. So the +`NetworkObject` on those prefabs does nothing. This matches CLAUDE.md §3 ("World objects +(pickables, harvestables) are not NetworkObjects"). + +**How to apply:** When generating or authoring world pickup prefabs, do NOT add a +`NetworkObject`. Required pieces are: the Pickable layer (11), a non-trigger collider on the +SAME GameObject as the `Pickable` (the interactor reads `IInteractable` via +`hit.collider.TryGetComponent`), the `Pickable` script wired to its `ItemData`, and id = -1 +(scene instances get a baked id via Tools ▸ Ashwild ▸ Assign World Object IDs). The Ashwild +Database tool ([[ashwild-database-tool]]) generates them this clean way. The vestigial +NetworkObjects on old prefabs could be stripped in a cleanup pass. diff --git a/Assets/DefaultPrefabObjects.asset b/Assets/DefaultPrefabObjects.asset index c8b3fe6..59c8351 100644 --- a/Assets/DefaultPrefabObjects.asset +++ b/Assets/DefaultPrefabObjects.asset @@ -14,20 +14,15 @@ MonoBehaviour: m_EditorClassIdentifier: FishNet.Runtime::FishNet.Managing.Object.DefaultPrefabObjects _prefabs: - {fileID: 4512293259955182956, guid: fe2b65b02f0484b41aa8cfa9fbbb0e1d, type: 3} - - {fileID: 3746800168945650153, guid: 8b1c5d7d20bb78c409bb820e38453998, type: 3} - {fileID: 4512293259955182956, guid: 35639798ad77fc145871588b25d66259, type: 3} - {fileID: 201277550, guid: 26a567abbe21227428f5c3d309d1d73c, type: 3} - {fileID: 4512293259955182956, guid: 0d6d0f48b03b17f49a6340103cd9b9d0, type: 3} - {fileID: 8475222101369129519, guid: 8cf33e8e99a9b0c4c8f29ff725650de6, type: 3} - {fileID: 4512293259955182956, guid: dafef736ca1ae384e9a19eb672843563, type: 3} - {fileID: 201277550, guid: 5b712878ecece354ba4ffb026c0a221c, type: 3} - - {fileID: 8518425841733827182, guid: 1e19fae830ce27a44b2068b7e4550efc, type: 3} - {fileID: 1374869993561577375, guid: c2eaf86c6fcc88a4fb49a391b143c867, type: 3} - - {fileID: 1851170348908994853, guid: c607101b481f147429c13a876ca3d401, type: 3} - {fileID: 4512293259955182956, guid: b8017cef39731ba439c70fecc09488e3, type: 3} - - {fileID: 7769887562568203203, guid: 7d11390e8f41d214396bc57f3c34e265, type: 3} - {fileID: 4512293259955182956, guid: 44611030e61220d42ab7c37ba3c0ea92, type: 3} - - {fileID: 2286933990687286586, guid: 292fc529ad2a9a54ea83dfc1beb0b683, type: 3} - {fileID: -5889822588553870904, guid: e412c881030eedb408a7af5b1ecd5c2f, type: 3} - {fileID: 8192566354860284824, guid: 6331b3542e64a564c81bc39cedf70c8d, type: 3} - {fileID: 4512293259955182956, guid: f32d4c19de900e64cb73cedcb8ba6f70, type: 3} diff --git a/Assets/GAME/Images/Item.meta b/Assets/GAME/Images/Item.meta new file mode 100644 index 0000000..92efe46 --- /dev/null +++ b/Assets/GAME/Images/Item.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: de582e2355db187429b0896feceb04e9 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/GAME/Images/Item/Axe_Stone.png b/Assets/GAME/Images/Item/Axe_Stone.png new file mode 100644 index 0000000..57f2f49 Binary files /dev/null and b/Assets/GAME/Images/Item/Axe_Stone.png differ diff --git a/Assets/GAME/Images/Item/Axe_Stone.png.meta b/Assets/GAME/Images/Item/Axe_Stone.png.meta new file mode 100644 index 0000000..b2aef95 --- /dev/null +++ b/Assets/GAME/Images/Item/Axe_Stone.png.meta @@ -0,0 +1,117 @@ +fileFormatVersion: 2 +guid: 0ea8988d57601254ca812967bcaf937f +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 13 + 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 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + 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: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 4 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + customData: + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/GAME/Images/Item/Axe_Wood.png b/Assets/GAME/Images/Item/Axe_Wood.png new file mode 100644 index 0000000..7c58f1d Binary files /dev/null and b/Assets/GAME/Images/Item/Axe_Wood.png differ diff --git a/Assets/GAME/Images/Item/Axe_Wood.png.meta b/Assets/GAME/Images/Item/Axe_Wood.png.meta new file mode 100644 index 0000000..d677259 --- /dev/null +++ b/Assets/GAME/Images/Item/Axe_Wood.png.meta @@ -0,0 +1,117 @@ +fileFormatVersion: 2 +guid: 573d176f3cdfdbb498814a58d66f6e49 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 13 + 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 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + 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: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 4 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + customData: + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/GAME/Images/Item/Pixaxe_Stone.png b/Assets/GAME/Images/Item/Pixaxe_Stone.png new file mode 100644 index 0000000..0d4be85 Binary files /dev/null and b/Assets/GAME/Images/Item/Pixaxe_Stone.png differ diff --git a/Assets/GAME/Images/Item/Pixaxe_Stone.png.meta b/Assets/GAME/Images/Item/Pixaxe_Stone.png.meta new file mode 100644 index 0000000..d36745a --- /dev/null +++ b/Assets/GAME/Images/Item/Pixaxe_Stone.png.meta @@ -0,0 +1,117 @@ +fileFormatVersion: 2 +guid: 43f5a0760e550c148ba53b7db9a7c24e +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 13 + 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 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + 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: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 4 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + customData: + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/GAME/Images/Item/Pixaxe_Wood.png b/Assets/GAME/Images/Item/Pixaxe_Wood.png new file mode 100644 index 0000000..25663fe Binary files /dev/null and b/Assets/GAME/Images/Item/Pixaxe_Wood.png differ diff --git a/Assets/GAME/Images/Item/Pixaxe_Wood.png.meta b/Assets/GAME/Images/Item/Pixaxe_Wood.png.meta new file mode 100644 index 0000000..d11dade --- /dev/null +++ b/Assets/GAME/Images/Item/Pixaxe_Wood.png.meta @@ -0,0 +1,117 @@ +fileFormatVersion: 2 +guid: 8a4bc5d9209e3344fbd9505fee280256 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 13 + 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 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + 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: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 4 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + customData: + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/GAME/Prefabs/Food/Pickable/CookedSteak.prefab b/Assets/GAME/Prefabs/Food/Pickable/CookedSteak.prefab index 3871207..60c443a 100644 --- a/Assets/GAME/Prefabs/Food/Pickable/CookedSteak.prefab +++ b/Assets/GAME/Prefabs/Food/Pickable/CookedSteak.prefab @@ -9,11 +9,10 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 6028821745233737597} + - component: {fileID: 5639895077949637244} - component: {fileID: 3533309669773555587} - component: {fileID: 2488581501338454467} - - component: {fileID: 5345512882623272780} - component: {fileID: 8419294417422120418} - - component: {fileID: 3746800168945650153} m_Layer: 11 m_Name: CookedSteak m_TagString: Untagged @@ -36,6 +35,22 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &5639895077949637244 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6507764929137009914} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: eed740dea8aa59b4cb516f25ce139314, type: 3} + m_Name: + m_EditorClassIdentifier: Assembly-CSharp::Ashwild.Network.Pickable + id: -1 + itemData: {fileID: 11400000, guid: 93acb9b63b2c4d03b8cbb021ebb7642d, type: 2} + quantity: 1 + interactionVerb: Pick up --- !u!33 &3533309669773555587 MeshFilter: m_ObjectHideFlags: 0 @@ -93,24 +108,6 @@ MeshRenderer: m_SortingOrder: 0 m_MaskInteraction: 0 m_AdditionalVertexStreams: {fileID: 0} ---- !u!114 &5345512882623272780 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6507764929137009914} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 7c57b699079965047b70cd1bad8f3554, type: 3} - m_Name: - m_EditorClassIdentifier: Assembly-CSharp::Pickable - _componentIndexCache: 0 - _addedNetworkObject: {fileID: 3746800168945650153} - _networkObjectCache: {fileID: 3746800168945650153} - itemData: {fileID: 11400000, guid: 93acb9b63b2c4d03b8cbb021ebb7642d, type: 2} - quantity: 1 - interactionVerb: Pick up --- !u!65 &8419294417422120418 BoxCollider: m_ObjectHideFlags: 0 @@ -132,61 +129,3 @@ BoxCollider: serializedVersion: 3 m_Size: {x: 0.2084811, y: 0.04969957, z: 0.27743918} m_Center: {x: -0.00043765083, y: 0.024869436, z: -0.0005873516} ---- !u!114 &3746800168945650153 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6507764929137009914} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 26b716c41e9b56b4baafaf13a523ba2e, type: 3} - m_Name: - m_EditorClassIdentifier: FishNet.Runtime::FishNet.Object.NetworkObject - k__BackingField: 0 - WasActiveDuringEdit: 0 - WasActiveDuringEdit_Set1: 1 - k__BackingField: 0 - k__BackingField: {fileID: 0} - k__BackingField: {fileID: 0} - NetworkBehaviours: - - {fileID: 5345512882623272780} - InitializedParentNetworkBehaviour: {fileID: 0} - InitializedNestedNetworkObjects: [] - RuntimeParentNetworkBehaviour: {fileID: 0} - RuntimeChildNetworkBehaviours: [] - _isNetworked: 1 - _isSpawnable: 1 - _isGlobal: 0 - _initializeOrder: 0 - _preventDespawnOnDisconnect: 0 - _defaultDespawnType: 0 - _initializedTimestamp: -8584197526105594093 - _localLevelOfDetailCalculationType: 0 - _useLevelOfDetail: 0 - _useRootLevelOfDetail: 1 - NetworkObserver: {fileID: 0} - _enablePrediction: 0 - _predictionType: 0 - _localReconcileCorrectionType: 2 - _graphicalObject: {fileID: 0} - _detachGraphicalObject: 0 - _enableStateForwarding: 1 - _networkTransform: {fileID: 0} - _ownerInterpolation: 1 - _ownerSmoothedProperties: 255 - _adaptiveInterpolation: 3 - _spectatorSmoothedProperties: 255 - _spectatorInterpolation: 2 - _enableTeleport: 0 - _teleportThreshold: 1 - k__BackingField: 3 - k__BackingField: 0 - k__BackingField: 4497985491359141594 - SceneId: 0 - SerializedTransformProperties: - Position: {x: 0, y: 0, z: 0} - Rotation: {x: 0.000000021855694, y: 0, z: -0, w: 1} - Scale: {x: 1, y: 1, z: 1} - IsValid: 1 diff --git a/Assets/GAME/Prefabs/Food/Pickable/Raw Steak.prefab b/Assets/GAME/Prefabs/Food/Pickable/Raw Steak.prefab index 16ed506..8506420 100644 --- a/Assets/GAME/Prefabs/Food/Pickable/Raw Steak.prefab +++ b/Assets/GAME/Prefabs/Food/Pickable/Raw Steak.prefab @@ -9,11 +9,10 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 2400332513845409276} - - component: {fileID: 4462286336473188449} + - component: {fileID: 5687242054726960884} - component: {fileID: 4579747089151895854} - component: {fileID: 6804968349030847047} - component: {fileID: 8375007824052685006} - - component: {fileID: 7769887562568203203} m_Layer: 11 m_Name: Raw Steak m_TagString: Untagged @@ -36,7 +35,7 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &4462286336473188449 +--- !u!114 &5687242054726960884 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -45,12 +44,10 @@ MonoBehaviour: m_GameObject: {fileID: 5263385035876967886} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 7c57b699079965047b70cd1bad8f3554, type: 3} + m_Script: {fileID: 11500000, guid: eed740dea8aa59b4cb516f25ce139314, type: 3} m_Name: - m_EditorClassIdentifier: Assembly-CSharp::Pickable - _componentIndexCache: 0 - _addedNetworkObject: {fileID: 7769887562568203203} - _networkObjectCache: {fileID: 7769887562568203203} + m_EditorClassIdentifier: Assembly-CSharp::Ashwild.Network.Pickable + id: -1 itemData: {fileID: 11400000, guid: 6b543ed8734f4dcf984c1c43d63a9207, type: 2} quantity: 1 interactionVerb: Pick up @@ -132,61 +129,3 @@ BoxCollider: serializedVersion: 3 m_Size: {x: 0.20744237, y: 0.052912164, z: 0.2803244} m_Center: {x: -0.000022616237, y: 0.026525198, z: -0.00026460737} ---- !u!114 &7769887562568203203 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5263385035876967886} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 26b716c41e9b56b4baafaf13a523ba2e, type: 3} - m_Name: - m_EditorClassIdentifier: FishNet.Runtime::FishNet.Object.NetworkObject - k__BackingField: 0 - WasActiveDuringEdit: 0 - WasActiveDuringEdit_Set1: 1 - k__BackingField: 0 - k__BackingField: {fileID: 0} - k__BackingField: {fileID: 0} - NetworkBehaviours: - - {fileID: 4462286336473188449} - InitializedParentNetworkBehaviour: {fileID: 0} - InitializedNestedNetworkObjects: [] - RuntimeParentNetworkBehaviour: {fileID: 0} - RuntimeChildNetworkBehaviours: [] - _isNetworked: 1 - _isSpawnable: 1 - _isGlobal: 0 - _initializeOrder: 0 - _preventDespawnOnDisconnect: 0 - _defaultDespawnType: 0 - _initializedTimestamp: -8584197526105594093 - _localLevelOfDetailCalculationType: 0 - _useLevelOfDetail: 0 - _useRootLevelOfDetail: 1 - NetworkObserver: {fileID: 0} - _enablePrediction: 0 - _predictionType: 0 - _localReconcileCorrectionType: 2 - _graphicalObject: {fileID: 0} - _detachGraphicalObject: 0 - _enableStateForwarding: 1 - _networkTransform: {fileID: 0} - _ownerInterpolation: 1 - _ownerSmoothedProperties: 255 - _adaptiveInterpolation: 3 - _spectatorSmoothedProperties: 255 - _spectatorInterpolation: 2 - _enableTeleport: 0 - _teleportThreshold: 1 - k__BackingField: 21 - k__BackingField: 0 - k__BackingField: 15131100777819643404 - SceneId: 0 - SerializedTransformProperties: - Position: {x: 0, y: 0, z: 0} - Rotation: {x: 0.000000021855694, y: 0, z: -0, w: 1} - Scale: {x: 1, y: 1, z: 1} - IsValid: 1 diff --git a/Assets/GAME/Prefabs/Pickable/Tools/axe01.prefab b/Assets/GAME/Prefabs/Pickable/Tools/axe01.prefab index cd017ab..0c2f93a 100644 --- a/Assets/GAME/Prefabs/Pickable/Tools/axe01.prefab +++ b/Assets/GAME/Prefabs/Pickable/Tools/axe01.prefab @@ -12,9 +12,8 @@ GameObject: - component: {fileID: 33113545875603948} - component: {fileID: 23481562414732822} - component: {fileID: -8701151183354302330} - - component: {fileID: -1685119718098522260} - component: {fileID: 1433484159821976236} - - component: {fileID: 1851170348908994853} + - component: {fileID: 2073025095026659661} m_Layer: 6 m_Name: axe01 m_TagString: Untagged @@ -115,24 +114,6 @@ BoxCollider: serializedVersion: 3 m_Size: {x: 0.5015001, y: 1.1154001, z: 0.16560005} m_Center: {x: 0.15155002, y: 0.294, z: 0.0001999997} ---- !u!114 &-1685119718098522260 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1878273237308662} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 7c57b699079965047b70cd1bad8f3554, type: 3} - m_Name: - m_EditorClassIdentifier: Assembly-CSharp::ItemPickup - _componentIndexCache: 0 - _addedNetworkObject: {fileID: 1851170348908994853} - _networkObjectCache: {fileID: 1851170348908994853} - itemData: {fileID: 11400000, guid: 66c8ce9f2516f22488502db44d9d49af, type: 2} - quantity: 1 - interactionVerb: Pick up --- !u!54 &1433484159821976236 Rigidbody: m_ObjectHideFlags: 0 @@ -160,7 +141,7 @@ Rigidbody: m_Interpolate: 0 m_Constraints: 0 m_CollisionDetection: 0 ---- !u!114 &1851170348908994853 +--- !u!114 &2073025095026659661 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -169,52 +150,10 @@ MonoBehaviour: m_GameObject: {fileID: 1878273237308662} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 26b716c41e9b56b4baafaf13a523ba2e, type: 3} + m_Script: {fileID: 11500000, guid: eed740dea8aa59b4cb516f25ce139314, type: 3} m_Name: - m_EditorClassIdentifier: FishNet.Runtime::FishNet.Object.NetworkObject - k__BackingField: 0 - WasActiveDuringEdit: 0 - WasActiveDuringEdit_Set1: 1 - k__BackingField: 0 - k__BackingField: {fileID: 0} - k__BackingField: {fileID: 0} - NetworkBehaviours: - - {fileID: -1685119718098522260} - InitializedParentNetworkBehaviour: {fileID: 0} - InitializedNestedNetworkObjects: [] - RuntimeParentNetworkBehaviour: {fileID: 0} - RuntimeChildNetworkBehaviours: [] - _isNetworked: 1 - _isSpawnable: 1 - _isGlobal: 0 - _initializeOrder: 0 - _preventDespawnOnDisconnect: 0 - _defaultDespawnType: 0 - _initializedTimestamp: -8584197526105594093 - _localLevelOfDetailCalculationType: 0 - _useLevelOfDetail: 0 - _useRootLevelOfDetail: 1 - NetworkObserver: {fileID: 0} - _enablePrediction: 0 - _predictionType: 0 - _localReconcileCorrectionType: 2 - _graphicalObject: {fileID: 0} - _detachGraphicalObject: 0 - _enableStateForwarding: 1 - _networkTransform: {fileID: 0} - _ownerInterpolation: 1 - _ownerSmoothedProperties: 255 - _adaptiveInterpolation: 3 - _spectatorSmoothedProperties: 255 - _spectatorInterpolation: 2 - _enableTeleport: 0 - _teleportThreshold: 1 - k__BackingField: 17 - k__BackingField: 0 - k__BackingField: 10800420217546823107 - SceneId: 0 - SerializedTransformProperties: - Position: {x: 0, y: 0, z: 0} - Rotation: {x: 0, y: -0.7071068, z: 0, w: 0.7071068} - Scale: {x: 1, y: 1, z: 1} - IsValid: 1 + m_EditorClassIdentifier: Assembly-CSharp::Ashwild.Network.Pickable + id: -1 + itemData: {fileID: 11400000, guid: 66c8ce9f2516f22488502db44d9d49af, type: 2} + quantity: 1 + interactionVerb: Pick up diff --git a/Assets/GAME/Prefabs/Pickable/Tools/hammer01.prefab b/Assets/GAME/Prefabs/Pickable/Tools/hammer01.prefab index 705f1eb..1240133 100644 --- a/Assets/GAME/Prefabs/Pickable/Tools/hammer01.prefab +++ b/Assets/GAME/Prefabs/Pickable/Tools/hammer01.prefab @@ -12,9 +12,8 @@ GameObject: - component: {fileID: 33852252603615026} - component: {fileID: 23994028819166706} - component: {fileID: 7229770545233589333} - - component: {fileID: 3008732563107889085} - component: {fileID: -4666900484668152208} - - component: {fileID: 8518425841733827182} + - component: {fileID: 2428768101541199601} m_Layer: 6 m_Name: hammer01 m_TagString: Untagged @@ -115,24 +114,6 @@ BoxCollider: serializedVersion: 3 m_Size: {x: 0.3812001, y: 0.7715, z: 0.20330004} m_Center: {x: -0.0043000067, y: 0.13665001, z: 0.0017500003} ---- !u!114 &3008732563107889085 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1085285520790580} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 7c57b699079965047b70cd1bad8f3554, type: 3} - m_Name: - m_EditorClassIdentifier: Assembly-CSharp::ItemPickup - _componentIndexCache: 0 - _addedNetworkObject: {fileID: 8518425841733827182} - _networkObjectCache: {fileID: 8518425841733827182} - itemData: {fileID: 11400000, guid: 4853e475b87b4e64aa4a568a2be2c7f0, type: 2} - quantity: 1 - interactionVerb: Pick up --- !u!54 &-4666900484668152208 Rigidbody: m_ObjectHideFlags: 0 @@ -160,7 +141,7 @@ Rigidbody: m_Interpolate: 0 m_Constraints: 0 m_CollisionDetection: 0 ---- !u!114 &8518425841733827182 +--- !u!114 &2428768101541199601 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -169,52 +150,10 @@ MonoBehaviour: m_GameObject: {fileID: 1085285520790580} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 26b716c41e9b56b4baafaf13a523ba2e, type: 3} + m_Script: {fileID: 11500000, guid: eed740dea8aa59b4cb516f25ce139314, type: 3} m_Name: - m_EditorClassIdentifier: FishNet.Runtime::FishNet.Object.NetworkObject - k__BackingField: 0 - WasActiveDuringEdit: 0 - WasActiveDuringEdit_Set1: 1 - k__BackingField: 0 - k__BackingField: {fileID: 0} - k__BackingField: {fileID: 0} - NetworkBehaviours: - - {fileID: 3008732563107889085} - InitializedParentNetworkBehaviour: {fileID: 0} - InitializedNestedNetworkObjects: [] - RuntimeParentNetworkBehaviour: {fileID: 0} - RuntimeChildNetworkBehaviours: [] - _isNetworked: 1 - _isSpawnable: 1 - _isGlobal: 0 - _initializeOrder: 0 - _preventDespawnOnDisconnect: 0 - _defaultDespawnType: 0 - _initializedTimestamp: -8584197526105594093 - _localLevelOfDetailCalculationType: 0 - _useLevelOfDetail: 0 - _useRootLevelOfDetail: 1 - NetworkObserver: {fileID: 0} - _enablePrediction: 0 - _predictionType: 0 - _localReconcileCorrectionType: 2 - _graphicalObject: {fileID: 0} - _detachGraphicalObject: 0 - _enableStateForwarding: 1 - _networkTransform: {fileID: 0} - _ownerInterpolation: 1 - _ownerSmoothedProperties: 255 - _adaptiveInterpolation: 3 - _spectatorSmoothedProperties: 255 - _spectatorInterpolation: 2 - _enableTeleport: 0 - _teleportThreshold: 1 - k__BackingField: 16 - k__BackingField: 0 - k__BackingField: 10690802766664710013 - SceneId: 0 - SerializedTransformProperties: - Position: {x: 0, y: 0, z: 0} - Rotation: {x: 0, y: -0.7071068, z: 0, w: 0.7071068} - Scale: {x: 1, y: 1, z: 1} - IsValid: 1 + m_EditorClassIdentifier: Assembly-CSharp::Ashwild.Network.Pickable + id: -1 + itemData: {fileID: 11400000, guid: 4853e475b87b4e64aa4a568a2be2c7f0, type: 2} + quantity: 1 + interactionVerb: Pick up diff --git a/Assets/GAME/Prefabs/Pickable/Tools/pickaxe01.prefab b/Assets/GAME/Prefabs/Pickable/Tools/pickaxe01.prefab index a5a751d..b1b0f9f 100644 --- a/Assets/GAME/Prefabs/Pickable/Tools/pickaxe01.prefab +++ b/Assets/GAME/Prefabs/Pickable/Tools/pickaxe01.prefab @@ -12,9 +12,8 @@ GameObject: - component: {fileID: 33121315882126232} - component: {fileID: 23142643217362146} - component: {fileID: 968333719620630415} - - component: {fileID: 1867436537062894882} - component: {fileID: 3862993572698624464} - - component: {fileID: 2286933990687286586} + - component: {fileID: 2898082274380822897} m_Layer: 6 m_Name: pickaxe01 m_TagString: Untagged @@ -115,24 +114,6 @@ BoxCollider: serializedVersion: 3 m_Size: {x: 0.92430025, y: 1.1134, z: 0.17970005} m_Center: {x: 0.004150004, y: 0.31980002, z: 0.0030500002} ---- !u!114 &1867436537062894882 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1392316285209212} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 7c57b699079965047b70cd1bad8f3554, type: 3} - m_Name: - m_EditorClassIdentifier: Assembly-CSharp::ItemPickup - _componentIndexCache: 0 - _addedNetworkObject: {fileID: 2286933990687286586} - _networkObjectCache: {fileID: 2286933990687286586} - itemData: {fileID: 11400000, guid: 60132cba2202496eb74f2afc1f89c81a, type: 2} - quantity: 1 - interactionVerb: Pick up --- !u!54 &3862993572698624464 Rigidbody: m_ObjectHideFlags: 0 @@ -160,7 +141,7 @@ Rigidbody: m_Interpolate: 0 m_Constraints: 0 m_CollisionDetection: 0 ---- !u!114 &2286933990687286586 +--- !u!114 &2898082274380822897 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -169,52 +150,10 @@ MonoBehaviour: m_GameObject: {fileID: 1392316285209212} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 26b716c41e9b56b4baafaf13a523ba2e, type: 3} + m_Script: {fileID: 11500000, guid: eed740dea8aa59b4cb516f25ce139314, type: 3} m_Name: - m_EditorClassIdentifier: FishNet.Runtime::FishNet.Object.NetworkObject - k__BackingField: 0 - WasActiveDuringEdit: 0 - WasActiveDuringEdit_Set1: 1 - k__BackingField: 0 - k__BackingField: {fileID: 0} - k__BackingField: {fileID: 0} - NetworkBehaviours: - - {fileID: 1867436537062894882} - InitializedParentNetworkBehaviour: {fileID: 0} - InitializedNestedNetworkObjects: [] - RuntimeParentNetworkBehaviour: {fileID: 0} - RuntimeChildNetworkBehaviours: [] - _isNetworked: 1 - _isSpawnable: 1 - _isGlobal: 0 - _initializeOrder: 0 - _preventDespawnOnDisconnect: 0 - _defaultDespawnType: 0 - _initializedTimestamp: -8584197526105594093 - _localLevelOfDetailCalculationType: 0 - _useLevelOfDetail: 0 - _useRootLevelOfDetail: 1 - NetworkObserver: {fileID: 0} - _enablePrediction: 0 - _predictionType: 0 - _localReconcileCorrectionType: 2 - _graphicalObject: {fileID: 0} - _detachGraphicalObject: 0 - _enableStateForwarding: 1 - _networkTransform: {fileID: 0} - _ownerInterpolation: 1 - _ownerSmoothedProperties: 255 - _adaptiveInterpolation: 3 - _spectatorSmoothedProperties: 255 - _spectatorInterpolation: 2 - _enableTeleport: 0 - _teleportThreshold: 1 - k__BackingField: 23 - k__BackingField: 0 - k__BackingField: 16031416610542904637 - SceneId: 0 - SerializedTransformProperties: - Position: {x: 0, y: 0, z: 0} - Rotation: {x: 0, y: -0.7071068, z: 0, w: 0.7071068} - Scale: {x: 1, y: 1, z: 1} - IsValid: 1 + m_EditorClassIdentifier: Assembly-CSharp::Ashwild.Network.Pickable + id: -1 + itemData: {fileID: 11400000, guid: 60132cba2202496eb74f2afc1f89c81a, type: 2} + quantity: 1 + interactionVerb: Pick up diff --git a/Assets/GAME/Script/Editor/Database.meta b/Assets/GAME/Script/Editor/Database.meta new file mode 100644 index 0000000..7051181 --- /dev/null +++ b/Assets/GAME/Script/Editor/Database.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5ca8a708a454f4e439dbff30ed6779fa +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/GAME/Script/Editor/Database/AshwildDatabase.uss b/Assets/GAME/Script/Editor/Database/AshwildDatabase.uss new file mode 100644 index 0000000..225f5b0 --- /dev/null +++ b/Assets/GAME/Script/Editor/Database/AshwildDatabase.uss @@ -0,0 +1,427 @@ +/* Ashwild Database window — dark, card-based styling. Loaded by AshwildDatabaseWindow. */ + +.ash-root { + flex-grow: 1; + background-color: rgb(36, 37, 41); +} + +/* ── Toolbar ─────────────────────────────────────────────── */ +.ash-toolbar { + flex-direction: row; + align-items: center; + height: 38px; + padding-left: 8px; + padding-right: 8px; + background-color: rgb(28, 29, 33); + border-bottom-width: 1px; + border-bottom-color: rgb(18, 19, 22); +} + +.ash-tab { + flex-direction: row; + align-items: center; + justify-content: center; + height: 26px; + padding-left: 12px; + padding-right: 14px; + margin-right: 4px; + border-radius: 6px; + background-color: rgba(0, 0, 0, 0); + border-width: 0; + color: rgb(150, 152, 158); + -unity-font-style: bold; + -unity-text-align: middle-center; +} + +.ash-tab__icon { + width: 15px; + height: 15px; + margin-right: 6px; + opacity: 0.85; +} + +.ash-tab:hover { + background-color: rgb(46, 47, 52); + color: rgb(220, 221, 225); +} + +.ash-tab--active { + background-color: rgb(64, 110, 220); + color: rgb(255, 255, 255); +} + +.ash-tab--active:hover { + background-color: rgb(74, 120, 230); + color: rgb(255, 255, 255); +} + +.ash-toolbar-spacer { + flex-grow: 1; +} + +.ash-search { + width: 180px; + margin-right: 6px; +} + +/* ── Body split ──────────────────────────────────────────── */ +.ash-body { + flex-direction: row; + flex-grow: 1; +} + +.ash-left { + width: 250px; + background-color: rgb(31, 32, 36); + border-right-width: 1px; + border-right-color: rgb(18, 19, 22); +} + +.ash-list { + flex-grow: 1; +} + +.ash-right { + flex-grow: 1; + padding: 12px; +} + +/* ── List rows ───────────────────────────────────────────── */ +.ash-row { + flex-direction: row; + align-items: center; + height: 48px; + padding-left: 10px; + padding-right: 10px; +} + +.ash-row__icon { + width: 40px; + height: 40px; + margin-right: 10px; + background-color: rgb(48, 49, 54); + border-radius: 6px; + -unity-background-scale-mode: scale-to-fit; +} + +.ash-row__label { + flex-grow: 1; + color: rgb(210, 211, 215); + overflow: hidden; + text-overflow: ellipsis; +} + +.ash-row__tag { + color: rgb(120, 122, 128); + font-size: 10px; + -unity-font-style: italic; +} + +.unity-list-view__item:hover .ash-row__label { + color: rgb(255, 255, 255); +} + +/* ── Footer (New button) ─────────────────────────────────── */ +.ash-footer { + padding: 6px; + border-top-width: 1px; + border-top-color: rgb(18, 19, 22); +} + +/* ── Buttons ─────────────────────────────────────────────── */ +.ash-btn { + height: 26px; + border-radius: 6px; + border-width: 0; + background-color: rgb(60, 61, 67); + color: rgb(220, 221, 225); + padding-left: 12px; + padding-right: 12px; +} + +.ash-btn:hover { + background-color: rgb(72, 73, 80); +} + +.ash-btn--primary { + background-color: rgb(64, 110, 220); + color: rgb(255, 255, 255); + -unity-font-style: bold; +} + +.ash-btn--primary:hover { + background-color: rgb(74, 120, 230); +} + +.ash-empty { + flex-grow: 1; + -unity-text-align: middle-center; + color: rgb(110, 112, 118); + -unity-font-style: italic; + white-space: normal; +} + +.ash-row__tag { + color: rgb(120, 122, 128); + font-size: 10px; + -unity-font-style: bold; +} + +/* ── Action bar (Ping / Delete) ──────────────────────────── */ +.ash-actionbar { + flex-direction: row; + align-items: center; + margin-bottom: 10px; +} + +/* ── Hero header ─────────────────────────────────────────── */ +.ash-hero { + flex-direction: row; + align-items: center; + background-color: rgb(43, 44, 49); + border-radius: 10px; + padding: 12px; + margin-bottom: 12px; +} + +.ash-hero__icon { + width: 72px; + height: 72px; + margin-right: 14px; + border-radius: 8px; + background-color: rgb(30, 31, 35); + border-width: 1px; + border-color: rgb(56, 57, 63); + -unity-background-scale-mode: scale-to-fit; +} + +.ash-hero__icon--clickable:hover { + border-color: rgb(64, 110, 220); + background-color: rgb(36, 38, 44); +} + +.ash-hero__info { + flex-grow: 1; +} + +.ash-hero__name { + margin-bottom: 6px; +} + +.ash-hero__name > .unity-text-field__input { + font-size: 18px; + -unity-font-style: bold; + background-color: rgba(0, 0, 0, 0); + border-width: 0; + border-bottom-width: 1px; + border-bottom-color: rgb(60, 61, 67); + padding-left: 0; + color: rgb(238, 239, 242); +} + +.ash-hero__typerow { + flex-direction: row; + align-items: center; +} + +.ash-hero__type { + width: 150px; + margin-right: 8px; +} + +.ash-hero__badge { + flex-direction: row; +} + +.ash-badge { + -unity-font-style: bold; + font-size: 10px; + padding-left: 8px; + padding-right: 8px; + padding-top: 3px; + padding-bottom: 3px; + border-radius: 10px; + -unity-text-align: middle-center; +} + +/* ── Cards ───────────────────────────────────────────────── */ +.ash-card { + background-color: rgb(43, 44, 49); + border-radius: 8px; + padding: 10px; + margin-bottom: 10px; +} + +.ash-card--accent { + border-left-width: 3px; + border-left-color: rgb(64, 110, 220); +} + +.ash-card__title { + -unity-font-style: bold; + font-size: 12px; + color: rgb(150, 175, 240); + margin-bottom: 8px; +} + +.ash-description .unity-text-field__input { + min-height: 48px; + white-space: normal; +} + +/* Tidy two-column label/field rows inside cards */ +.ash-card .unity-base-field__label { + min-width: 130px; + color: rgb(170, 172, 178); +} + +.ash-buttons { + flex-direction: row; + margin-top: 8px; +} + +.ash-buttons .ash-btn { + margin-right: 6px; +} + +/* ── Recipe equation strip ───────────────────────────────── */ +.ash-equation { + flex-direction: row; + flex-wrap: wrap; + align-items: center; + background-color: rgb(31, 32, 36); + border-radius: 10px; + padding: 10px; + margin-bottom: 12px; +} + +.ash-equation__op { + font-size: 18px; + -unity-font-style: bold; + color: rgb(120, 122, 130); + margin-left: 6px; + margin-right: 6px; +} + +/* ── Recipe ingredient / result cards ────────────────────── */ +.ash-rchip { + width: 116px; + min-height: 124px; + align-items: center; + background-color: rgb(46, 47, 53); + border-radius: 10px; + padding-top: 12px; + padding-bottom: 10px; + padding-left: 8px; + padding-right: 8px; + margin-top: 4px; + margin-bottom: 4px; + border-width: 1px; + border-color: rgb(56, 57, 63); +} + +.ash-rchip--result { + background-color: rgb(40, 50, 44); + border-color: rgb(64, 110, 80); +} + +.ash-rchip__icon { + width: 48px; + height: 48px; + margin-bottom: 8px; + border-radius: 8px; + background-color: rgb(30, 31, 35); + border-width: 1px; + border-color: rgb(58, 59, 65); + -unity-background-scale-mode: scale-to-fit; +} + +.ash-rchip__icon:hover { + border-color: rgb(64, 110, 220); +} + +.ash-rchip__name { + color: rgb(214, 215, 220); + font-size: 11px; + -unity-font-style: bold; + -unity-text-align: middle-center; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + max-width: 100px; + margin-bottom: 8px; +} + +.ash-rchip__stepper { + flex-direction: row; + align-items: center; +} + +.ash-rchip__step { + width: 22px; + height: 22px; + padding-left: 0; + padding-right: 0; + border-radius: 5px; + border-width: 0; + background-color: rgb(60, 61, 67); + color: rgb(225, 226, 230); + font-size: 14px; + -unity-font-style: bold; + -unity-text-align: middle-center; +} + +.ash-rchip__step:hover { + background-color: rgb(72, 73, 80); +} + +.ash-rchip__qty { + width: 34px; + color: rgb(238, 239, 242); + -unity-font-style: bold; + -unity-text-align: middle-center; +} + +.ash-rchip__remove { + position: absolute; + top: 5px; + right: 5px; + width: 18px; + height: 18px; + padding-left: 0; + padding-right: 0; + border-radius: 9px; + border-width: 0; + background-color: rgba(0, 0, 0, 0); + color: rgb(130, 110, 112); + font-size: 11px; +} + +.ash-rchip__remove:hover { + background-color: rgb(110, 56, 58); + color: rgb(255, 210, 210); +} + +/* Dashed "add ingredient" tile */ +.ash-rchip--add { + justify-content: center; + background-color: rgba(64, 110, 220, 0.07); + border-color: rgb(74, 90, 130); +} + +.ash-rchip--add:hover { + background-color: rgba(64, 110, 220, 0.16); + border-color: rgb(96, 130, 210); +} + +.ash-rchip__plus { + font-size: 30px; + -unity-font-style: bold; + color: rgb(120, 150, 220); + -unity-text-align: middle-center; +} + +/* ── Recipe name field (styled like an item hero name) ───── */ +.ash-recipe-name { + margin-bottom: 12px; +} diff --git a/Assets/GAME/Script/Editor/Database/AshwildDatabase.uss.meta b/Assets/GAME/Script/Editor/Database/AshwildDatabase.uss.meta new file mode 100644 index 0000000..f3f59ca --- /dev/null +++ b/Assets/GAME/Script/Editor/Database/AshwildDatabase.uss.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: ae9520351e53151458d972c6a63ae1e6 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0} + disableValidation: 0 + unsupportedSelectorAction: 0 diff --git a/Assets/GAME/Script/Editor/Database/AshwildDatabaseWindow.cs b/Assets/GAME/Script/Editor/Database/AshwildDatabaseWindow.cs new file mode 100644 index 0000000..f7469af --- /dev/null +++ b/Assets/GAME/Script/Editor/Database/AshwildDatabaseWindow.cs @@ -0,0 +1,463 @@ +using System.Collections.Generic; +using UnityEditor; +using UnityEditor.UIElements; +using UnityEngine; +using UnityEngine.UIElements; +using Ashwild.Crafting; +using Ashwild.Inventory; + +namespace Ashwild.EditorTools +{ + /// + /// The Ashwild Database — a UI Toolkit window for browsing, creating and editing the project's + /// authored ScriptableObjects (ItemData and CraftingRecipe). The left pane lists every asset of + /// the active tab; the right pane edits the selection through a dedicated custom view + /// (ItemEditorView / RecipeEditorView), and for items offers one-click generation of the world + /// pickup and in-hand prefabs around a chosen source object (see ItemAssetFactory). Pure UI: + /// all asset/prefab work is delegated to the factories and views. + /// + public class AshwildDatabaseWindow : EditorWindow + { + #region Types + + /// + /// Which asset family the left list currently shows. + /// + private enum Tab { Items, Recipes } + + #endregion + + #region Constants + + private const string UssPath = "Assets/GAME/Script/Editor/Database/AshwildDatabase.uss"; + + #endregion + + #region State + + private Tab activeTab = Tab.Items; + private string searchFilter = string.Empty; + + private readonly List sourceItems = new List(); + private Object selectedAsset; + + #endregion + + #region UI References + + private ListView listView; + private VisualElement rightPane; + private Button itemsTab; + private Button recipesTab; + + #endregion + + #region Menu + + /// + /// Opens (or focuses) the database window. + /// + [MenuItem("Tools/Ashwild/Database")] + public static void Open() + { + AshwildDatabaseWindow window = GetWindow(); + window.titleContent = new GUIContent("Ashwild Database"); + window.minSize = new Vector2(720, 420); + } + + #endregion + + #region Window Lifecycle + + /// + /// Builds the full window tree once when the window opens. + /// + private void CreateGUI() + { + VisualElement root = rootVisualElement; + root.AddToClassList("ash-root"); + + StyleSheet sheet = AssetDatabase.LoadAssetAtPath(UssPath); + if (sheet != null) root.styleSheets.Add(sheet); + + root.Add(BuildToolbar()); + + VisualElement body = new VisualElement(); + body.AddToClassList("ash-body"); + body.Add(BuildLeftPane()); + body.Add(BuildRightPane()); + root.Add(body); + + RefreshList(); + } + + /// + /// Rebuilds the list when assets change outside the window (created/deleted/renamed elsewhere). + /// + private void OnProjectChange() + { + if (listView != null) RefreshList(); + } + + #endregion + + #region Toolbar + + /// + /// Builds the top toolbar: the two family tabs, a search field, and the database rebuild action. + /// + private VisualElement BuildToolbar() + { + VisualElement toolbar = new VisualElement(); + toolbar.AddToClassList("ash-toolbar"); + + itemsTab = MakeTab("Items", Tab.Items, "d_Prefab Icon"); + recipesTab = MakeTab("Recipes", Tab.Recipes, "d_ScriptableObject Icon"); + toolbar.Add(itemsTab); + toolbar.Add(recipesTab); + + VisualElement spacer = new VisualElement(); + spacer.AddToClassList("ash-toolbar-spacer"); + toolbar.Add(spacer); + + ToolbarSearchField search = new ToolbarSearchField(); + search.AddToClassList("ash-search"); + search.RegisterValueChangedCallback(evt => + { + searchFilter = evt.newValue ?? string.Empty; + RefreshList(); + }); + toolbar.Add(search); + + Button rebuild = new Button(ItemDatabaseBuilder.Rebuild) { text = "Rebuild DB" }; + rebuild.AddToClassList("ash-btn"); + rebuild.tooltip = "Re-scan every ItemData and rewrite the network ItemDatabase."; + toolbar.Add(rebuild); + + return toolbar; + } + + /// + /// Creates one toolbar tab button (icon + label) that switches the active family when clicked. + /// The icon is a built-in editor icon resolved by name; it is simply skipped if not found. + /// + private Button MakeTab(string label, Tab tab, string iconName) + { + Button button = new Button(() => SetTab(tab)); + button.AddToClassList("ash-tab"); + if (tab == activeTab) button.AddToClassList("ash-tab--active"); + + Texture icon = EditorGUIUtility.IconContent(iconName).image; + if (icon != null) + { + Image image = new Image { image = icon, scaleMode = ScaleMode.ScaleToFit }; + image.AddToClassList("ash-tab__icon"); + button.Add(image); + } + + button.Add(new Label(label)); + return button; + } + + /// + /// Switches the active family, repaints the tab highlight, clears the selection and reloads. + /// + private void SetTab(Tab tab) + { + if (tab == activeTab) return; + activeTab = tab; + + itemsTab.EnableInClassList("ash-tab--active", tab == Tab.Items); + recipesTab.EnableInClassList("ash-tab--active", tab == Tab.Recipes); + + selectedAsset = null; + RefreshList(); + ShowSelection(); + } + + #endregion + + #region Left Pane + + /// + /// Builds the left pane: a styled list of the active family plus a footer "New" button. + /// + private VisualElement BuildLeftPane() + { + VisualElement left = new VisualElement(); + left.AddToClassList("ash-left"); + + listView = new ListView(sourceItems) + { + fixedItemHeight = 48, + selectionType = SelectionType.Single, + makeItem = MakeRow, + bindItem = BindRow + }; + listView.AddToClassList("ash-list"); + listView.selectionChanged += OnListSelectionChanged; + left.Add(listView); + + VisualElement footer = new VisualElement(); + footer.AddToClassList("ash-footer"); + Button newButton = new Button(CreateNewAsset) { text = "+ New" }; + newButton.AddToClassList("ash-btn"); + newButton.AddToClassList("ash-btn--primary"); + footer.Add(newButton); + left.Add(footer); + + return left; + } + + /// + /// Builds the reusable visual for a single list row (icon, name, type tag). + /// + private VisualElement MakeRow() + { + VisualElement row = new VisualElement(); + row.AddToClassList("ash-row"); + + VisualElement icon = new VisualElement { name = "icon" }; + icon.AddToClassList("ash-row__icon"); + row.Add(icon); + + Label label = new Label { name = "label" }; + label.AddToClassList("ash-row__label"); + row.Add(label); + + Label tag = new Label { name = "tag" }; + tag.AddToClassList("ash-row__tag"); + row.Add(tag); + + return row; + } + + /// + /// Fills a row visual from the asset at the given index (icon from the item/result sprite). + /// + private void BindRow(VisualElement element, int index) + { + Object asset = sourceItems[index]; + element.Q