Unity WebGL

Questions techniques liées à l’utilisation d'Unity (et n'entrant pas dans le cadre d'une des sections suivantes)
sotec
Messages : 542
Inscription : 21 Sep 2012 10:11

Unity WebGL

Message par sotec » 04 Mars 2015 09:37

Une petite question qui me trotte dans la tête , le WebGL étant du javascript, une appli en webGL a t'elle ses sources visible depuis le code source de la page ?
┬─┬ノ(º - ºノ) - (╯°□°)╯︵ ┻━┻

Avatar de l’utilisateur
yoyoyaya
Messages : 1656
Inscription : 30 Mai 2011 13:14
Localisation : PAAAAARTOUUUU
Contact :

Re: Unity WebGL

Message par yoyoyaya » 04 Mars 2015 10:42

sotec a écrit :Une petite question qui me trotte dans la tête , le WebGL étant du javascript, une appli en webGL a t'elle ses sources visible depuis le code source de la page ?
J'étais tombé sur ça dans la journée. Ça pourrait peut-être être répondre à ta question.
http://forum.unity3d.com/threads/any-wa ... st-1827056
Cygon4 a écrit :The asm.js-based JavaScript generated by compiling a Unity project to WebGL is not a direct translation of C#/UnityScript to JavaScript. Instead, it goes through this (rather creative) pipeline:

Your C#/UnityScript code gets compiled into .NET bytecode
A tool named IL2CPP converts the .NET bytecode into C++
This C++ then gets compiled by CLang into LLVM bitcode
LLVM applies heavy optimization to this code (just like machine code compilation, which LLVM usually does)
The resulting LLVM code is then converted into asm.js-based JavaScript
In this asm.js-based JavaScript, all of your scripts, Unity's scripts, Mono BCL and C++ standard library classes are mangled into one big blob of bytes that is massaged by crazy low-level JavaScript instructions.

That's about as hard to decompile as any machine code-compiled application. The most likely path of attack would be to try to get back to LLVM bitcode from the asm.js-based JavaScript and then decompile the LLVM bitcode into plain C. But the result would have close to nothing in common with the original C#/UnitScript code (just a bunch of sequentially numbered functions). It may help someone understand your license check or such, but stealing code this way would be harder than just writing it from scratch.
ImageImage

Avatar de l’utilisateur
darkloy
Messages : 290
Inscription : 23 Mars 2011 09:36
Contact :

Re: Unity WebGL

Message par darkloy » 04 Mars 2015 10:44

oui mais de la à les exploiter...

sotec
Messages : 542
Inscription : 21 Sep 2012 10:11

Re: Unity WebGL

Message par sotec » 04 Mars 2015 11:42

bon, parfait, asm.js-based étant aussi lisible qu'un .exe, il n'y a pas plus de risque ^^
┬─┬ノ(º - ºノ) - (╯°□°)╯︵ ┻━┻

Répondre

Revenir vers « Unity le logiciel »