Search the Community
Showing results for tags 'visual studio'.
-
I have some code I use for test that adds a web interface to my worlds that I thought I would share. I created a little demo project that moves a cylinder around from a browser and reports on clicked objects. I'm still pretty new to Unigine and I'm not a programmer, so no guarantees :). You should run this from Visual Studio. Sometimes running from the editor doesn't release all resources and you'll need to restart the editor. Also, if you keep your console window open it will hang Unigine. (Just close the console, or "Press any key to continue"). The tester is based on a two channel WebSocket connection. To enable this the project needs to use the Web SDK. The project file has: <Project Sdk="Microsoft.NET.Sdk.Web"> <PropertyGroup> <OutputType>Exe</OutputType> <TargetFramework>net5.0</TargetFramework> <LangVersion>10.0</LangVersion> <Nullable>enable</Nullable> <RootNamespace>UWeb</RootNamespace> <StartupObject>UWeb.Program</StartupObject> ... The file "Socket.cs" has the C# webhosting and socket parts. "Script.Bios.js" has the main browser code. The socket parts are: self.AsyncFunction = Object.getPrototypeOf(async function () { }).constructor; //::Fragment:ControlSocket self.control = new WebSocket(location.origin.replace('http', 'ws') + "/"); control.onopen = () => { control.send(context.name); }; control.onmessage = async (msg) => { try { s = await (new AsyncFunction(msg.data))(); control.send(!(s) ? "success" : s); } catch (e) { control.send(`Fail: ${e}`); } }; //::Fragment:TransitSocket self.transit = new WebSocket(location.origin.replace('http', 'ws') + "/Transit"); transit.onopen = () => { transit.send(context.name); }; The control socket channel executes JavaScript sent from Unigine/App. The transit channel sends messages from the browser. The startup code goes in main. Sockets_ = new(new(root, 5001, WebReceiver, BrowserBios())); _ = SetForegroundWindow(FindWindow(null, "UWeb")); Sockets.Control.Say("console.log('success')"); The World part consists of a simple component "Mover". Mover exposes a Target Port (just a public field here). On frame, the mover checks to see if the Target position is different than the current position. If so, it moves to the new position. When it gets there it sends a notice that is shown in the browser. The zip contains a project. I've also attached some of the key files. Reminder that this should be run from Visual Studio, not the editor. TestFixture.zip main.cs Mover.cs Script.bios.js Socket.cs
-
Hello everyone! I have such problem: ShowInEditor doesn't work, if i use classes(E.g. interface) from other project(but they are in same solution). My project structure: Test Library is a simple class library TestProject is unigine app After it I modify my Component like this I have success build, there is nothing on my component But when I remove intefrace from TestScript everything works perfect How can I fix this?
- 2 replies
-
- c#
- unigine 2.16
-
(and 1 more)
Tagged with:
-
Dear customers, It's been year when we changed our minimal spec for Windows compiler to Visual Studio 2013. Right now we are thinking about moving to the next versions and we would like to know your opinion on that and your plans for compiler upgrades in your projects for the next year. Linux compiler upgrade is also considered as an option (especially if we would use some new C++ 11/14/17 features). Thanks!
- 3 replies
-
- 1
-
- visual studio
- gcc
-
(and 2 more)
Tagged with:
-
Announcement: Visual Studio minimal version changes starting with 2.4.x SDK update
silent posted a topic in C++ Programming
Hi Guys, We are informing you that starting with next SDK Update (2.4.x) and further you must have Visual Studio 2013.5 or newer to be able to use C++ API and link with Unigine engine dll. If you are still using old Visual Studio versions, please, consider an upgrade. The last version with 2012 / 2010 Visual Studio support is currently released 2.3.1. We are starting to add C++ 11 features to the API, that will break backwards compatibility with older Visual Studios (like 2012 or 2010). One of the new feature that you will be able to use is bool operator in Unigine::Ptr<>: NodePtr node = Editor::get()->findNode("sun"); if (node) { ... } or something like that: if (NodePtr sun = Editor::get()->findNode("sun")) { sun->setWorldTransform(...); ... } It's now possible because of using the explicit specifier (one of the C++ 11 feature). If your project is heavily depends on Visual Studio 2012 / 2010, please, don't hesitate to write a comment to this topic. Thanks!-
- visual studio
- 2013
-
(and 1 more)
Tagged with:
-
I have added the unigine_vs2013.vcxproj project to my solution file for a C++ application I'm developing. When I try to build the engine in VS2013, either in Debug-Double or Release-Double I get a ton of build errors. Most of them appear to be syntax errors. We are using the most recent release candidate, "UNIGINE_VERSION 0x1000400d." Attached is a log of the build errors. Any idea what's wrong? Thank you for your time, Andrew debug-double-build-errors.txt
-
Reproduction Steps If you have installed Visual Studio version 9.0 and 10.0, when you generate Unigine dll in 64 bits, the resulting file depends on MSVCR90.DLL instead of MSVCR100.DLL (most recent version). This doesn't happen with 32 bits version. Possible Fix Modify scons_x64.bat as follows: ... set VCVARS=%VS110COMNTOOLS%..\..\VC\bin\x86_amd64\vcvarsx86_amd64.bat if exist "%VCVARS%" ( call "%VCVARS%" goto vs_ok ) set VCVARS=%VS100COMNTOOLS%..\..\VC\bin\x86_amd64\vcvarsx86_amd64.bat if exist "%VCVARS%" ( call "%VCVARS%" goto vs_ok ) set VCVARS=%VS90COMNTOOLS%..\..\VC\bin\x86_amd64\vcvarsx86_amd64.bat if exist "%VCVARS%" ( call "%VCVARS%" goto vs_ok ) set SETENV=%WINSDK71_DIR%\bin\SetEnv.cmd if exist "%SETENV%" ( call "%SETENV%" /x64 goto vs_ok ) set SETENV=D:\Microsoft\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd if exist "%SETENV%" ( call "%SETENV%" /x64 goto vs_ok ) ...