Jump to content

ManNamedSteve

Members
  • Posts

    3
  • Joined

  • Last visited

ManNamedSteve's Achievements

Refugee

Refugee (1/15)

0

Reputation

  1. I poked around a bit more and thought the only logical step was to try your exact configuration. When I tried to to do this with "My Project (1)", it gave the error on the screen below. When I tried again with My Project (2), it loaded a popup saying it was importing assets. After this was done, it loaded the Editor for project (1), with a ton of errors, seen in the background, then it gave the same error as before, but seemingly for project (2). Hopefully I made that understandable enough. Before this happened: When I try using the MultiPlatformExportAssetBundle script, it gives me an error saying that (UnityEngine.Render) GraphicsDeviceType doesn't have an entry for Vulkan. My GPU has Vulkan support and I made sure to update all of my drivers before exporting, but it still gave the error. So I have had the line for Vulkan commented out, as seen in my original post. I'm wondering, regardless of my previous post, what tag should I be using for blocks? Do I need to change the layer to anything, or can it just be default? Thanks in advance.
  2. Thanks for the response. I did originally have DisplayType as well as MultiBlockDim in the block's XML, but removed them while testing; it made no difference. I've also tried using tga and png for the texture in Unity, with no difference there either. I have a feeling I am missing a major piece of the puzzle: Do I need to be using the entire SDX kit in order to install/run/see the custom texture? Alternatively, is either of the ExportAssetBundle scripts I am using out of date? Here is the model as exported by Unity: https://drive.google.com/file/d/1eBkow51Y4jhSDwd82Bnm3fhffj9GAtcK/ Here are the texts of both EAB scripts I've tried using: ExportAssetBundle.cs: using UnityEngine; using UnityEditor; public class ExportAssetBundles { [MenuItem("Assets/Build AssetBundle From Selection - Track dependencies")] static void ExportResource() { // Bring up save panel string path = EditorUtility.SaveFilePanel("Save Resource", "", "New Resource", "unity3d"); if (path.Length != 0) { // Build the resource file from the active selection. Object[] selection = Selection.GetFiltered(typeof(Object), SelectionMode.DeepAssets); BuildPipeline.BuildAssetBundle(Selection.activeObject, selection, path, BuildAssetBundleOptions.CollectDependencies | BuildAssetBundleOptions.CompleteAssets, BuildTarget.StandaloneWindows); Selection.objects = selection; } } } MultiPlatformExportAssetBundle.cs: using UnityEngine; using UnityEditor; using UnityEngine.Rendering; public class MultiPlatformExportAssetBundles { [MenuItem("Assets/Build Multi-Platform AssetBundle From Selection")] static void ExportResource() { // Bring up save panel string path = EditorUtility.SaveFilePanel("Save Resource", "", "New Resource", "unity3d"); if (path.Length != 0) { // include the following Graphic APIs PlayerSettings.SetGraphicsAPIs(BuildTarget.StandaloneWindows, new GraphicsDeviceType[] { GraphicsDeviceType.Direct3D11, GraphicsDeviceType.OpenGLCore}); //, GraphicsDeviceType.Vulkan NOTE** I removed this from the function above as it was causing an error, not having Vulkan. // Build the resource file from the active selection. Object[] selection = Selection.GetFiltered(typeof(Object), SelectionMode.DeepAssets); #pragma warning disable CS0618 // Type or member is obsolete BuildPipeline.BuildAssetBundle(Selection.activeObject, selection, path, BuildAssetBundleOptions.CollectDependencies | BuildAssetBundleOptions.CompleteAssets, BuildTarget.StandaloneWindows); Selection.objects = selection; #pragma warning restore CS0618 // Type or member is obsolete } } }
  3. I am making a mod. I'm struggling heavily on getting a custom block into the game. The block I'm currently try to add is a simple cube with a single texture placed on it. I have been through a lot of hoops in the past 24 hours and at this current point it doesn't work at all, no matter what I try - even the original method I used no longer seems to work in any capacity, throwing errors every time. I've tried using the MultiPlatformEAB script as well as the older ExportAssetBundle script. I have used Unity 5.3.8f2, 5.3.8b2, and 2020.3.34f1. Currently it is giving me two errors when trying to load blocks.xml: 2022-05-25T18:45:44 35.595 ERR Model '#@modfolder(Steve's Recipes):Resources/willyBoi.unity3d?willyBoiPrefab' not found on block with name WILLIAM 2022-05-25T18:45:44 35.595 ERR XML loader: Loading and parsing 'blocks.xml' failed 2022-05-25T18:45:44 35.601 EXC Model '#@modfolder(Steve's Recipes):Resources/willyBoi.unity3d?willyBoiPrefab' not found on block with name WILLIAM at BlockShapeModelEntity.PoolLoadCallback () [0x0002f] in <6a01347f98174dbdb41cb4a4eedf5af7>:0 at GameObjectPool.AddPooledObject (System.String name, GameObjectPool+LoadCallback _loadCallback, GameObjectPool+CreateCallback _createOnceToAllCallback, GameObjectPool+CreateCallback _createCallback) [0x00064] in <6a01347f98174dbdb41cb4a4eedf5af7>:0 at BlockShapeModelEntity.Init (Block _block) [0x00180] in <6a01347f98174dbdb41cb4a4eedf5af7>:0 at BlocksFromXml.ParseBlock (System.Boolean _bEditMode, System.Xml.XmlElement elementBlock) [0x00af0] in <6a01347f98174dbdb41cb4a4eedf5af7>:0 at BlocksFromXml+<CreateBlocks>d__0.MoveNext () [0x000fc] in <6a01347f98174dbdb41cb4a4eedf5af7>:0 at ThreadManager+<CoroutineWrapperWithExceptionCallback>d__48.MoveNext () [0x00044] in <6a01347f98174dbdb41cb4a4eedf5af7>:0 UnityEngine.StackTraceUtility:ExtractStringFromException(Object) Log:Exception(Exception) <>c__DisplayClass52_0:<loadSingleXml>b__2(Exception) <CoroutineWrapperWithExceptionCallback>d__48:MoveNext() UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr) Here is the block itself in blocks.xml: <block name="WILLIAM"> <property name="CreativeMode" value="Player"/> <property name="Material" value="Mcloth"/> <property name="Shape" value="ModelEntity"/> <property name="MaxDamage" value="1"/> <property name="Place" value="TowardsPlacerInverted"/> <property name="StabilitySupport" value="false"/> <property name="Meshfile" value="#@modfolder:Resources/willyBoi.unity3d?willyBoiPrefab"/> <property name="Model" value="#@modfolder:Resources/willyBoi.unity3d?willyBoiPrefab"/> <drop event="Destroy" count="0"/> <property name="FilterTags" value="MC_building,SC_loot"/> </block> As far as I'm aware, everything is correct in Unity as well: Under Tag and Layer, I have tried (respectively): T_Block, T_Mesh_B. Default, RenderInTexture. The result is the same regardless of which tag or layer I have selected. My question is simple; What am I doing wrong? I would greatly appreciate any help here. I am really scratching my head, and while I am not super familiar with Unity, this has me stumped at a fundamental level. MORE INFO: When it did work, it only loaded as a semi-transparent pink square with no shader or material. This was done using the original EAB script (found here, on Nexus), using Unity 5.3.8f2. It did have collision, and it could be broken, but that was it. In an effort to fix the pink-ness, I tried to find more info about the process of making/exporting the asset, but could only find tutorials/resources for anything but blocks. When I tried exporting the file in Unity 5.3.8b2, it said 3 of the functions used in the script were deprecated. This led me to finding the newer MultiPlatform script, which when used in 5.3.8b2, exported a unity3d file that the game couldn't use. Then I found Xyth's A20 Tutorial, used Unity 2020, no luck there either. I entered the tags listed on the A20 Tutorial into 5.3.8f2 to use, though I'm not sure if it was the correct thing to do. Throughout the exports and tests and I have been checking on the contents of the unity3d file with War3zuk's Asset Builder, and noticed that it still has most, if not all, of the assets it did when it just a pink block. I used this as my main reference point for creating the model, saving it, etc. https://www.youtube.com/watch?v=pxzDvUHAeYs (Yes it's my dog; just a test block)
×
×
  • Create New...