Game
Kordex - The Golden Path
7 years ago

Log #3: How to enable ECS (Entity Component System) in Unity 2018.2.0f2


Hey guys!

I recently wanted to give Unity’s new Entity Component System a try and ran into several problems. Here’s how I successfully enabled ECS in Unity 2018.2.0f2

Change the Runtime Version

Click File -> Build Settings… -> Player Settings…

In the inspector open the “Other Settings”-Foldout and set .NET 4.x Equivalent for “Scritping Runtime Version” and .NET 4.x for “Api Compatibility Version”.

5d09b63ce0ce0.png

Install ECS via the Package Manager

Click Window -> Package Manager

Select the All-Tab and Entities from the list. Click Install on the top right corner.

5d09b63d98a3b.png

Maybe ECS is already running on your system, but it may happen that you get the following errors:

5d09b63e35b96.png

Here’re parts of the plain text (for search engine purposes):

UNetWeaver error: Exception :System.IO.IOException: Sharing violation on path Temp\Assembly-CSharp-firstpass.pdb

Failure generating network code.
UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface:TickCompilationPipeline(EditorScriptCompilationOptions, BuildTargetGroup, BuildTarget)

To solve this issue I found the following solution in the Unity forum: Patch Weaver

Attention: you can only do this if you’re not using UNet (Unity Networking) in your project!

Download DnSpy

Follow this link and download the latest version of DnSpy: Download DnSpy

5d09b63eb8222.png

Backup Unity.UNetWeaver.dll

Create a copy of Unity.UNet.Weaver.dll which can be found in Editor/Data/Managed.

5d09b63f5dfc3.png

Modify Unity.UNetWeaver.dll

Make sure Unity is closed and open the original Unity.UNetWeaver.dll with DnSpy. Unfold Unity.UnetWeaver -> Unity.UNetWeaver.dll -> Unity.UnetWeaver -> Program in the tree on the left side. Right click on Process(…) and select Edit Method (C#).

5d09b63fbe263.png

Delete the body of the method and type in “return true;”

5d09b64048ec0.png

Press File -> Save Module… and overwrite the original Unity.UNetWeaver.dll

Open Unity again and your compile errors are gone :)

Thank you for reading and have a nice day!



0 comments

Loading...

Next up

Log #2: New Island Part

Did you know that today is #InternationalJazzDay? 🎷😎

No? 😯 Well, we couldn't pass up this date!

And what better to celebrate this day than #Pecaminosa #OST? 🎷

Let us know what you think about it and have a great weekend!

We are under attack!

In the quest for accessibility, I'm adding Resurrection Shrines for players on the 'novice' end of the platforming spectrum.

In order to unlock the power of a Shrine, you must collect 3 'Souls' from your dead corpses! (the floating blue orbs)

The Darkside Detective: A Fumble in the Dark is out TODAY! 🖱️Advanced pointing, clicking action 🖨️Very funny words! Loads of them! 👻6 sarcastic, spectral cases to solve

Shuiro Haname. #Commission

Commission for @ShuHaname

Call it 'wrong turn'!🚫 The feeling of running into a house with only one exit🚪, and being doomed to die. #pixelart #pixelartist #pixelartwork #art #pixel #indiegame #IndieGameDev #indieartist

Spaaaace~

These are background sprites I've created for a game I'm working on at school ^w^ Click on the post to see how the sprites connect. You won't regret it! (personally, I think it's pretty heheh)

Drawn in Piskel using my mouse. Whaddya think?

Only true badasses may pass! #conceptart #art #gamedesign

blender animation experimentation, getting the hang of things fast. arms, rig, & gun models by me ofc