commit d1c734f07811c3fb52d62ca24f0980ed4e65e23a Author: jracek Date: Mon Jan 13 19:59:41 2025 +0100 Recursive calling of ObjectExporters from a SceneExporter, icons diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..4a62547 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,96 @@ +# +# Auto Generated +# + +# Other +*.pdf filter=lfs diff=lfs merge=lfs -text +# Unity Binary Assets +*.cubemap filter=lfs diff=lfs merge=lfs -text +*.unitypackage filter=lfs diff=lfs merge=lfs -text +# Executables +*.exe filter=lfs diff=lfs merge=lfs -text +*.dll filter=lfs diff=lfs merge=lfs -text +*.so filter=lfs diff=lfs merge=lfs -text +*.pdb filter=lfs diff=lfs merge=lfs -text +*.mdb filter=lfs diff=lfs merge=lfs -text +# Packaging +*.zip filter=lfs diff=lfs merge=lfs -text +*.7z filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.rar filter=lfs diff=lfs merge=lfs -text +*.tar filter=lfs diff=lfs merge=lfs -text +# 3D +*.fbx filter=lfs diff=lfs merge=lfs -text +*.blend filter=lfs diff=lfs merge=lfs -text +# Image +*.hdr filter=lfs diff=lfs merge=lfs -text +*.jpg filter=lfs diff=lfs merge=lfs -text +*.jpeg filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.apng filter=lfs diff=lfs merge=lfs -text +*.atsc filter=lfs diff=lfs merge=lfs -text +*.gif filter=lfs diff=lfs merge=lfs -text +*.bmp filter=lfs diff=lfs merge=lfs -text +*.exr filter=lfs diff=lfs merge=lfs -text +*.tga filter=lfs diff=lfs merge=lfs -text +*.tiff filter=lfs diff=lfs merge=lfs -text +*.tif filter=lfs diff=lfs merge=lfs -text +*.iff filter=lfs diff=lfs merge=lfs -text +*.pict filter=lfs diff=lfs merge=lfs -text +*.dds filter=lfs diff=lfs merge=lfs -text +*.xcf filter=lfs diff=lfs merge=lfs -text +*.leo filter=lfs diff=lfs merge=lfs -text +*.kra filter=lfs diff=lfs merge=lfs -text +*.kpp filter=lfs diff=lfs merge=lfs -text +*.clip filter=lfs diff=lfs merge=lfs -text +*.webm filter=lfs diff=lfs merge=lfs -text +*.webp filter=lfs diff=lfs merge=lfs -text +*.psd filter=lfs diff=lfs merge=lfs -text +*.afphoto filter=lfs diff=lfs merge=lfs -text +*.afdesign filter=lfs diff=lfs merge=lfs -text +# Audio +*.mp3 filter=lfs diff=lfs merge=lfs -text +*.ogg filter=lfs diff=lfs merge=lfs -text +*.wav filter=lfs diff=lfs merge=lfs -text +*.aiff filter=lfs diff=lfs merge=lfs -text +*.aif filter=lfs diff=lfs merge=lfs -text +*.mod filter=lfs diff=lfs merge=lfs -text +*.it filter=lfs diff=lfs merge=lfs -text +*.s3m filter=lfs diff=lfs merge=lfs -text +*.xm filter=lfs diff=lfs merge=lfs -text +# Video +*.mov filter=lfs diff=lfs merge=lfs -text +*.avi filter=lfs diff=lfs merge=lfs -text +*.asf filter=lfs diff=lfs merge=lfs -text +*.mpg filter=lfs diff=lfs merge=lfs -text +*.mpeg filter=lfs diff=lfs merge=lfs -text +*.mp4 filter=lfs diff=lfs merge=lfs -text +*.flv filter=lfs diff=lfs merge=lfs -text +*.ogv filter=lfs diff=lfs merge=lfs -text +*.wmv filter=lfs diff=lfs merge=lfs -text +# Unity-Specific +* text=auto + +# Some assets such as lighting data, nav meshes, etc will always be binary, +# as will anything with [PreferBinarySerialization] +# (Even if you force it to text mode serialization) +# Meaning autoCRLF on git will fuck up your project. +*.asset auto +TimeManager.asset -text + +# +# The following should be text to allow git merges +# + +*.anim text +*.controller text +*.mat text +*.meta text +*.physicsMaterial text +*.physicsMaterial2D text +*.prefab text +*.unity text +*.preset text +*.lfs_test filter=lfs diff=lfs merge=lfs -text + + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3b21346 --- /dev/null +++ b/.gitignore @@ -0,0 +1,551 @@ +# Originally Created by https://www.gitignore.io/api/git,unity,macos,csharp,windows,visualstudio,visualstudiocode + +### Csharp ### +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs +.vsconfig + +# Mono auto generated files +mono_crash.* + +# Build results +/[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +/x64/ +/x86/ +/[Aa][Rr][Mm]/ +/[Aa][Rr][Mm]64/ +bld/ +/[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +#**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +### Git ### +# Created by git for backups. To disable backups in Git: +# $ git config --global mergetool.keepBackup false +*.orig + +# Created by git when using merge tools for conflicts +*.BACKUP.* +*.BASE.* +*.LOCAL.* +*.REMOTE.* +*_BACKUP_*.txt +*_BASE_*.txt +*_LOCAL_*.txt +*_REMOTE_*.txt + +### macOS ### +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +# MemoryCaptures can get excessive in size. +# They also could contain extremely sensitive data +/[Mm]emoryCaptures/ + +# Asset meta data should only be ignored when the corresponding asset is also ignored +#!/[Aa]ssets/**/*.meta +#[Aa]ssets/**/csc.* + +# Uncomment this line if you wish to ignore the asset store tools plugin +# /[Aa]ssets/AssetStoreTools* + +# Autogenerated Jetbrains Rider plugin +/[Aa]ssets/Plugins/Editor/JetBrains* + +# Visual Studio cache directory +.vs/ + +# Gradle cache directory +.gradle/ + +# Autogenerated VS/MD/Consulo solution and project files +ExportedObj/ +.consulo/ +*.csproj +*.unityproj +*.sln +*.suo +*.tmp +*.user +*.userprefs +*.pidb +*.booproj +*.svd +*.pdb +*.mdb +*.opendb +*.VC.db +*.idea + +# Unity3D generated meta files +*.pidb.meta +*.pdb.meta +*.mdb.meta + +# Unity3D generated file on crash reports +sysinfo.txt + +# Builds +*.apk +*.unitypackage + +# Crashlytics generated file +crashlytics-build.properties + +# Packed Addressables +/[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin* + +# Temporary auto-generated Android Assets +/[Aa]ssets/[Ss]treamingAssets/aa.meta +/[Aa]ssets/[Ss]treamingAssets/aa/* + + +### VisualStudioCode ### +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json + +### VisualStudioCode Patch ### +# Ignore all local history of files +.history + +### Windows ### +# Windows thumbnail cache files +Thumbs.db +Thumbs.db:encryptable +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + + +#==================================================================== +#============================== UNITY =============================== +#==================================================================== + + +# This .gitignore file should be placed at the root of your Unity project directory +# +# Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore +# +/[Ll]ibrary/ +/[Tt]emp/ +/[Oo]bj/ +/[Bb]uild/ +/[Bb]uilds/ +/[Ll]ogs/ +/[Uu]ser[Ss]ettings/ + +#==================================================================== +#=========================== VS / VS CODE =========================== +#==================================================================== + +# VSCode +*.suo +*.userosscache +*.sln.docstates +*.user +*.rsuser + +#==================================================================== +#============================= BLENDER ============================== +#==================================================================== + +*.blend[123456789] +*.blend[123456789].meta + +#==================================================================== +#========================== UNITY PLUGINS =========================== +#==================================================================== + +# BAKERY + +# Fuckit, we'll have to rebuild them +*/BakeryLightmaps/* +/Assets/BakeryLightmaps.meta + +# Obnoxious cache files that change a lot +/Assets/Plugins/Bakery/ftGlobalStorage.asset +/Assets/Plugins/Bakery/ftGlobalStorage.asset.meta +/Assets/Plugins/Bakery/ftLocalStorage.asset +/Assets/Plugins/Bakery/ftLocalStorage.asset.meta + +#==================================================================== +#======================== GENERAL PURPOSE =========================== +#==================================================================== + + +# Deliberate Exclusions: +# Note: needs a pattern for .meta files too (unless this is a root only thing) +/exclude/ +/exclude_*/* + +# Global ignore +**/#vcignore/ +**/#vcignore.meta + + diff --git a/Editor.meta b/Editor.meta new file mode 100644 index 0000000..9c8784b --- /dev/null +++ b/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d64fb2a2412d7958ca13d15956c4182b +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Editor/PSXObjectExporterEditor.cs b/Editor/PSXObjectExporterEditor.cs new file mode 100644 index 0000000..7dbb41e --- /dev/null +++ b/Editor/PSXObjectExporterEditor.cs @@ -0,0 +1,19 @@ +using UnityEngine; +using UnityEditor; +using PSXSplash.Runtime; + +[CustomEditor(typeof(PSXObjectExporter))] +public class PSXObjectExporterEditor : Editor +{ + public override void OnInspectorGUI() + { + base.OnInspectorGUI(); + DrawDefaultInspector(); + + PSXObjectExporter comp = (PSXObjectExporter)target; + if (GUILayout.Button("Export")) + { + comp.Export(); + } + } +} diff --git a/Editor/PSXObjectExporterEditor.cs.meta b/Editor/PSXObjectExporterEditor.cs.meta new file mode 100644 index 0000000..a2dcc29 --- /dev/null +++ b/Editor/PSXObjectExporterEditor.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 89b9844e599dd374098ec6168f0de0b0 \ No newline at end of file diff --git a/Editor/PSXSceneExporterEditor.cs b/Editor/PSXSceneExporterEditor.cs new file mode 100644 index 0000000..bf6721a --- /dev/null +++ b/Editor/PSXSceneExporterEditor.cs @@ -0,0 +1,17 @@ +using UnityEngine; +using UnityEditor; +using PSXSplash.Runtime; + +[CustomEditor(typeof(PSXSceneExporter))] +public class PSXSceneExporterEditor : Editor { + public override void OnInspectorGUI() { + base.OnInspectorGUI(); + DrawDefaultInspector(); + + PSXSceneExporter comp = (PSXSceneExporter)target; + if(GUILayout.Button("Export")) { + comp.Export(); + } + + } +} \ No newline at end of file diff --git a/Editor/PSXSceneExporterEditor.cs.meta b/Editor/PSXSceneExporterEditor.cs.meta new file mode 100644 index 0000000..81f6257 --- /dev/null +++ b/Editor/PSXSceneExporterEditor.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: becf2eb607e7a60baaf3bebe4683d66f \ No newline at end of file diff --git a/Editor/net.psxsplash.splashedit.Editor.asmdef b/Editor/net.psxsplash.splashedit.Editor.asmdef new file mode 100644 index 0000000..f9fc32e --- /dev/null +++ b/Editor/net.psxsplash.splashedit.Editor.asmdef @@ -0,0 +1,16 @@ +{ + "name": "net.psxplash.splashedit.Editor", + "rootNamespace": "", + "references": [ + "net.psxsplash.splashedit.Runtime" + ], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/Editor/net.psxsplash.splashedit.Editor.asmdef.meta b/Editor/net.psxsplash.splashedit.Editor.asmdef.meta new file mode 100644 index 0000000..88082a4 --- /dev/null +++ b/Editor/net.psxsplash.splashedit.Editor.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 7e3500b5974da9723bdd0d457348ea2d +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Icons.meta b/Icons.meta new file mode 100644 index 0000000..3ac132a --- /dev/null +++ b/Icons.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ab7e1dbd79d3e1101b7d44cdf06a2991 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Icons/PSXSObjectExporter.png b/Icons/PSXSObjectExporter.png new file mode 100644 index 0000000..7dbfda7 Binary files /dev/null and b/Icons/PSXSObjectExporter.png differ diff --git a/Icons/PSXSObjectExporter.png.meta b/Icons/PSXSObjectExporter.png.meta new file mode 100644 index 0000000..54d4571 --- /dev/null +++ b/Icons/PSXSObjectExporter.png.meta @@ -0,0 +1,130 @@ +fileFormatVersion: 2 +guid: e11677149a517ca5186e32dfda3ec088 +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: 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 + 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 + - serializedVersion: 4 + buildTarget: WebGL + 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: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Icons/PSXSceneExporter.png b/Icons/PSXSceneExporter.png new file mode 100644 index 0000000..a97f192 Binary files /dev/null and b/Icons/PSXSceneExporter.png differ diff --git a/Icons/PSXSceneExporter.png.meta b/Icons/PSXSceneExporter.png.meta new file mode 100644 index 0000000..9580ffa --- /dev/null +++ b/Icons/PSXSceneExporter.png.meta @@ -0,0 +1,130 @@ +fileFormatVersion: 2 +guid: 0be7a2d4700082dbc83b9274837c70bc +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: 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 + 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 + - serializedVersion: 4 + buildTarget: WebGL + 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: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime.meta b/Runtime.meta new file mode 100644 index 0000000..57f552a --- /dev/null +++ b/Runtime.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 49f302f0a6255c06c8e340024aa43f45 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/PSXObjectExporter.cs b/Runtime/PSXObjectExporter.cs new file mode 100644 index 0000000..3809855 --- /dev/null +++ b/Runtime/PSXObjectExporter.cs @@ -0,0 +1,13 @@ +using UnityEngine; + +namespace PSXSplash.Runtime +{ + public class PSXObjectExporter : MonoBehaviour + { + public void Export() + { + Debug.Log($"Export: {this.name}"); + } + } +} + diff --git a/Runtime/PSXObjectExporter.cs.meta b/Runtime/PSXObjectExporter.cs.meta new file mode 100644 index 0000000..4ebe016 --- /dev/null +++ b/Runtime/PSXObjectExporter.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: bea0f31a495202580ac77bd9fd6e99f2 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: e11677149a517ca5186e32dfda3ec088, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/PSXSceneExporter.cs b/Runtime/PSXSceneExporter.cs new file mode 100644 index 0000000..28fbc5e --- /dev/null +++ b/Runtime/PSXSceneExporter.cs @@ -0,0 +1,40 @@ +using UnityEditor; +using UnityEngine; +using UnityEngine.SceneManagement; + +namespace PSXSplash.Runtime +{ + public class PSXSceneExporter : MonoBehaviour + { + public void Export() + { + Debug.Log($"Exporting scene: {SceneManager.GetActiveScene().name}"); + + Scene activeScene = SceneManager.GetActiveScene(); + foreach (GameObject obj in activeScene.GetRootGameObjects()) + { + ExportAllPSXExporters(obj.transform); + } + } + + void ExportAllPSXExporters(Transform parentTransform) + { + PSXObjectExporter exporter = parentTransform.GetComponent(); + + if (exporter != null) + { + exporter.Export(); + } + + foreach (Transform child in parentTransform) + { + ExportAllPSXExporters(child); + } + } + + void OnDrawGizmos() + { + Gizmos.DrawIcon(transform.position, "Packages/net.psxsplash.splashedit/Icons/PSXSceneExporter.png", true); + } + } +} diff --git a/Runtime/PSXSceneExporter.cs.meta b/Runtime/PSXSceneExporter.cs.meta new file mode 100644 index 0000000..3cf8f3c --- /dev/null +++ b/Runtime/PSXSceneExporter.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ab5195ad94fd173cfb6d48ee06eaf245 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 0be7a2d4700082dbc83b9274837c70bc, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/net.psxsplash.splashedit.Runtime.asmdef b/Runtime/net.psxsplash.splashedit.Runtime.asmdef new file mode 100644 index 0000000..453360d --- /dev/null +++ b/Runtime/net.psxsplash.splashedit.Runtime.asmdef @@ -0,0 +1,14 @@ +{ + "name": "net.psxsplash.splashedit.Runtime", + "rootNamespace": "", + "references": [], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/Runtime/net.psxsplash.splashedit.Runtime.asmdef.meta b/Runtime/net.psxsplash.splashedit.Runtime.asmdef.meta new file mode 100644 index 0000000..3ea92ec --- /dev/null +++ b/Runtime/net.psxsplash.splashedit.Runtime.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 1afaf17520143848ea52af093808349d +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/package.json b/package.json new file mode 100644 index 0000000..32f2624 --- /dev/null +++ b/package.json @@ -0,0 +1,8 @@ +{ + "name": "net.psxsplash.splashedit", + "version": "1.0.0", + "displayName": "Splashedit", + "description": "A toolkit for PSX asset management within Unity", + "unity": "6000.0" + } + \ No newline at end of file diff --git a/package.json.meta b/package.json.meta new file mode 100644 index 0000000..d70bd40 --- /dev/null +++ b/package.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 4ce4c77cd43204cf8bdfca08c2b66f83 +PackageManifestImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: