From 4afd28adf9c1d41d781a041156af04a4e674be3d Mon Sep 17 00:00:00 2001 From: Henry de Jongh Date: Fri, 28 Dec 2018 15:48:27 +0100 Subject: [PATCH 1/2] Now displays a SabreCSG icon in the hierarchy on CSG Models. --- Gizmos/SabreCSG16.png | Bin 0 -> 1840 bytes Gizmos/SabreCSG16.png.meta | 76 ++++++++++++++++++++++++++++++++ Scripts/CSGModel.cs | 8 ++++ Scripts/UI/SabreCSGResources.cs | 8 ++++ 4 files changed, 92 insertions(+) create mode 100644 Gizmos/SabreCSG16.png create mode 100644 Gizmos/SabreCSG16.png.meta diff --git a/Gizmos/SabreCSG16.png b/Gizmos/SabreCSG16.png new file mode 100644 index 0000000000000000000000000000000000000000..9f27423970b6f61b4ceeaf6bdf47a89a13108106 GIT binary patch literal 1840 zcmaJ?c~BE)6pvLDP!s{RT(Smf#b((f7rTHoAwel5NH~hvs+;VFtdeX<7D+f1wbV*2 zLsP9%S`<8rTBTY$sECMQ89IuBBUq`^YD;A}?BP+Y3f+iU|8Tl9yWjV|@BQBUy=!*M zQuSgFcRzO?kLMA$M4{nUPv`48nfnIa9VNKMmsO^-$&8-OB`g$AMlxCoh%*wIl!hWm zdv+TY$>UAjK&Pa$>8b==#~8y1r%ss7Xy(v7USzb*Oz757ETE+_X;T#c_xeUYK$B7Y zx5X-0Wsac?^pZRam7J$e(dDhtVI)6#5fEv^IRi$DB>7F257aLSi%OHtij_J6qHqG zq0KDKm;k3mLd)c^QGAZ+SO`Y5O7+~Z$@(l&T*@FDVTO<}7&022aXrQ)rs_^mJovoMiHQhkWgT_ltMv7MCheDy#y8` zT<~Lf@`dD$H7R$(1z{fNf|DpoYV~?O7*1#g^BnOM-g)N z%?o`re#AAWbNhTMIN|wRQ6_GfEZo!tbTn+?hEW-(kfqqJCnU!+Kc@JM6a=mNDCm>& zKabM}6s$hHB#oM&^?q}oHg3(XZ=6EA(*VN$alFbu03l8%NDXQBvrNtZ%>m`9#e@cmK9Y%juH+ zWqr$L7v!~PyjH5I8Rkv7SJ-L#>6grXBZWKXUpl#VVqx{;e4nb$qB(}3vg4cECiw0B zyWn!u8O^W-E}G|}5A;_Cv>z+EJ8;A}s&S;PbiL;D2JxQ%6IFoF;~hNP>%%iMs*58c zB8Iag-%tDX@&~f^hh--#^HVbmb|h^mnbzw=r{21#F0wbeZNF_6c?4^Zh438f-ognGpR(mmcxTVH~SBZUt-3lMSweG^Juar0jwzndcE=@x<-St!2k0MbG^W8HX zj(+>KJ$&!H8Eu6X*@DEN4eHx7k81Zu9QCjFPafLWIGV9}aiwkX#%(jT+h?7xin~uK z(XNkgZtXtnmfTwQ&&s;19pPP9rmg&G)Na4uG|{N=rU$$R_m!8+y0fF(-IPgH*A6?9Z-V?{U z-G!g2J+D8=)z{X+4;n7by6D!t{?LP}y(4u)-}U--ul%|5#PS1^@Q}8IdEN!X$Grv7 z{gap>_{=%iZArw2(ZhZRfEy~q8;0B!qlf(k4>yfWY3b`oJ9NL&%TlL5=l()) + { + drawRect.xMax -= 2; + drawRect.xMin = drawRect.xMax - 16; + drawRect.height = 16; + + Graphics.DrawTexture(drawRect, SabreCSGResources.SabreCSG16IconTexture); + } if (EditMode) { diff --git a/Scripts/UI/SabreCSGResources.cs b/Scripts/UI/SabreCSGResources.cs index 355a37f0..9fdc8172 100644 --- a/Scripts/UI/SabreCSGResources.cs +++ b/Scripts/UI/SabreCSGResources.cs @@ -209,6 +209,14 @@ public static Texture2D CollisionIconTexture } } + public static Texture2D SabreCSG16IconTexture + { + get + { + return (Texture2D)LoadObject("Gizmos/SabreCSG16.png"); + } + } + public static Texture2D DialogOverlayTexture { get From b3364655e0fb1b99e49ecf7b97ddb2d8cdecc0aa Mon Sep 17 00:00:00 2001 From: Henry de Jongh Date: Fri, 28 Dec 2018 16:02:11 +0100 Subject: [PATCH 2/2] Fixed black hierarchy icon in Unity 5. --- Gizmos/SabreCSG16.png.meta | 57 ++++++++++++-------------------------- 1 file changed, 18 insertions(+), 39 deletions(-) diff --git a/Gizmos/SabreCSG16.png.meta b/Gizmos/SabreCSG16.png.meta index 87d43c72..02b3b82f 100644 --- a/Gizmos/SabreCSG16.png.meta +++ b/Gizmos/SabreCSG16.png.meta @@ -2,17 +2,14 @@ fileFormatVersion: 2 guid: 96e5019047a79df4fbd09f640789c8d7 TextureImporter: fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 4 + serializedVersion: 2 mipmaps: mipMapMode: 0 - enableMipMap: 1 - sRGBTexture: 1 - linearTexture: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 fadeOut: 0 borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 mipMapFadeDistanceStart: 1 mipMapFadeDistanceEnd: 3 bumpmap: @@ -22,54 +19,36 @@ TextureImporter: normalMapFilter: 0 isReadable: 0 grayScaleToAlpha: 0 - generateCubemap: 6 + generateCubemap: 0 cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 seamlessCubemap: 0 - textureFormat: 1 + textureFormat: -3 maxTextureSize: 2048 textureSettings: - serializedVersion: 2 - filterMode: -1 - aniso: -1 + filterMode: 0 + aniso: 1 mipBias: -1 - wrapU: -1 - wrapV: -1 - wrapW: -1 - nPOTScale: 1 + wrapMode: 1 + nPOTScale: 0 lightmap: 0 + rGBM: 0 compressionQuality: 50 + allowsAlphaSplitting: 0 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: 0 - spriteTessellationDetail: -1 - textureType: 0 - textureShape: 1 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - platformSettings: - - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] spriteSheet: - serializedVersion: 2 sprites: [] outline: [] - physicsShape: [] spritePackingTag: userData: assetBundleName: