Save
Saving
  • W
    williamthompsonj

    I believe I'm almost done updating the unity backend, my last step is updating the shaders and things in git\Backends\Unity\kha\graphics4 and hopefully I get a clean build that is successful. Wish me good luck.

    posted in Kode read more
  • W
    williamthompsonj

    I'm still working through updating some of the unity api stuff to get things to export properly but I keep seeing warnings in unity about line endings not being consistent (new line vs. carriage return and new line). How would you feel if I normalized all the line endings and removed white space at the end of lines for an initial commit (no functional code changes) and then did a commit with the changes to update the unity backend? I can generate a diff so you can see the changes before I offer any kind of commit.

    posted in Kode read more
  • W
    williamthompsonj

    My goodness, you are right again, I copied the extern instead of the normal class declaration but with the right declaration it cleared that build error. I've changed my previous post to reflect this difference in case someone comes and views this post later. After building the unity project again and then updating within unity it has many more missing assembly references but now I know how to fix them, I'll let you know when I manage to get it working. Thanks again for your help.

    posted in Kode read more
  • W
    williamthompsonj

    *** EDIT *** This works, explanation fixed.

    Now I see what you mean. Side note: I mistakenly copied/pasted haxelib instead of just haxe, I'm not using haxelib as part of this process. Sorry for the confusion.

    I copied this code:

    package kha.netsync;
    
    import haxe.io.Bytes;
    
    class Network {
    	public function new(url: String, port: Int, errorCallback: Void->Void, closeCallback: Void->Void) {}
    	public function send(bytes: Bytes, mandatory: Bool): Void {}
    	public function listen(listener: Bytes->Void): Void {}
    }
    

    into this file path:

    kha\git\Backends\Unity\kha\netsync\Network.hx
    

    and compiled again. Still don't see this file generated:

    build\unity\Assets\Sources\src\kha\netsync\Network.cs
    

    I'm using this command to build from the command line (yes I made those environment variables point to the correct places):

    node "%KHA_PATH%\make" unity --ffmpeg "%FFMPEG_PATH%\ffmpeg.exe"
    

    On another note, within the hxcs_build.txt file, under the begin modules section, it does list "M kha.netsync.Network" among the rest of the modules.

    Any further ideas I should try?

    posted in Kode read more
  • W
    williamthompsonj

    Thank you for the reply Robert. I didn't realize the same file existed in the krom backend (exact same code with minor whitespace differences). The trouble I have is not the missing kha/haxe file, the trouble is the file does not get carried over into the unity project. This file exists:

    Exists
    Haxe -> kha\git\Sources\kha\netsync\Network.hx

    Missing
    Unity Project -> Assets\Sources\src\kha\netsync\Network.cs

    Does that help clarify?

    posted in Kode read more
  • W
    williamthompsonj

    I'm tinkering with the Unity backend to see if I can get it working with the current git version of kha (5 August 2019). I managed to find/correct all the build errors and successfully build a unity project that loads in unity hub and allows me to convert to the current version of unity (2019.2.0f1). Unity throws an error within unity related to kha.netsync.Network (the project is missing this file when built). Where do I look to figure out why this file (that exists in Sources\kha\netsync) does not get built into the unity project? When the project builds it finds every other file in that folder but not Network. I appreciate any help offered. Here is the error unity shows when I load the project (after it automatically updates it):

    Assets\Sources\src\kha\netsync\Session.cs(266,30): error CS0234: The type or namespace name 'Network' does not exist in the namespace 'kha.netsync' (are you missing an assembly reference?)
    

    posted in Kode read more