Jump to content

Search the Community

Showing results for tags 'C#'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to UNIGINE Forums
    • News & Announcements
    • Getting started
  • Development
    • Content Creation
    • World Design
    • Rendering
    • Animation
    • Physics, Navigation and Path Finding
    • UI Systems
    • Sound & Video
    • Editor
    • C++ Programming
    • C# Programming
    • Networking
    • Sim IG (Image Generator)
    • VR Discussions
    • General
  • Improving UNIGINE
    • Documentation
    • Feedback for UNIGINE team
    • Bug Reports
    • Unigine SDK Beta feedback
  • Community
    • Add-on Store (https://store.unigine.com/)
    • Showcase
    • Collaboration
    • Tools, Plugins, Materials & Tutorials
    • General Discussions
  • Legacy
    • UnigineScript

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

  1. SplineGraph in C#

    Hey there I have a problem. I want to create a spline via C# so I thought it is a good idea to transfer the sample Spline (C++) into C# but my Spline wont render and I have no idea why because it should show a spline (with the Visualizer). Because when I assign the Script to a NodeDummy or so nothing happens does someone have an idea why? Code: using System; using System.Collections; using System.Collections.Generic; using Unigine; [Component(PropertyGuid = "295cde640e861673976ae9364c0e4f1d868385d8")] public class TestSpline : Component { SplineGraph spline; private void Init() { Unigine.Console.Run("show_messages 1"); //create spline garph spline = new SplineGraph(); //generate spline CreateSpline(spline); } private void Update() { // write here code to be called before updating each render frame RenderSpline(spline); } private void CreateSpline(SplineGraph splineGraph) { splineGraph.AddPoint(Rand(-10.0f, 10.0f)); splineGraph.AddPoint(Rand(-10.0f, 10.0f)); splineGraph.AddPoint(Rand(-10.0f, 10.0f)); splineGraph.AddPoint(Rand(-10.0f, 10.0f)); splineGraph.AddSegment(0, Rand(-10.0f, 10.0f), new vec3(0.0f, 0.0f, 1.0f), 1, Rand(-10.0f, 10.0f), new vec3(0.0f, 0.0f, 1.0f)); splineGraph.AddSegment(1, Rand(-10.0f, 10.0f), new vec3(0.0f, 0.0f, 1.0f), 2, Rand(-10.0f, 10.0f), new vec3(0.0f, 0.0f, 1.0f)); splineGraph.AddSegment(2, Rand(-10.0f, 10.0f), new vec3(0.0f, 0.0f, 1.0f), 3, Rand(-10.0f, 10.0f), new vec3(0.0f, 0.0f, 1.0f)); splineGraph.AddSegment(3, Rand(-10.0f, 10.0f), new vec3(0.0f, 0.0f, 1.0f), 0, Rand(-10.0f, 10.0f), new vec3(0.0f, 0.0f, 1.0f)); } public void RenderSpline(SplineGraph splineGraph) { int num_segments = 50; for (int i = 0; i < splineGraph.NumSegments; i++) { vec3 startpoint = new vec3(splineGraph.GetSegmentStartPoint(i)); vec3 starttangent = new vec3(splineGraph.GetSegmentStartTangent(i)); vec3 endpoint = new vec3(splineGraph.GetSegmentEndPoint(i)); vec3 endtangent = new vec3(splineGraph.GetSegmentEndTangent(i)); Visualizer.RenderVector(startpoint, startpoint + starttangent, new vec4(1.0f, 0.0f, 0.0f, 0.3f), 0.05f); Visualizer.RenderVector(endpoint, endpoint + endtangent, new vec4(1.0f, 0.0f, 0.0f, 0.3f), 0.05f); for (int j = 0; j < num_segments; j++) { vec3 p0 = new vec3(splineGraph.CalcSegmentPoint(i, (float)j / num_segments)); vec3 p1 = new vec3(splineGraph.CalcSegmentPoint(i, (float)j + 1 / num_segments)); Visualizer.RenderLine3D(p0, p1, new vec4(1.0f, 1.0f, 1.0f, 1.0f)); } } } public vec3 Rand(float min, float max) { Random rand = new Random(); vec3 ret = new vec3(); ret.x = (float)rand.Next((int)min, (int)max); ret.y = (float)rand.Next((int)min, (int)max); ret.z = (float)rand.NextDouble(); //returns a number btwn 0.0 and 1.0 return ret; } public void MoveMesh(SplineGraph splineGraph) { float time = Unigine.Engine.TotalTime; //float t = time - Math.Floor((double)(time / spline.NumSegments)) * spline.NumSegments; float t = (float)(time - Math.Floor(time / splineGraph.NumSegments) * splineGraph.NumSegments); int segment_id = (int)t; t -= (float) segment_id; vec3 p = new vec3(splineGraph.CalcSegmentPoint(segment_id, t)); vec3 direction = new vec3(splineGraph.CalcSegmentTangent(segment_id, t)); vec3 up = new vec3(splineGraph.CalcSegmentUpVector(segment_id, t)); //mesh is not implemented still yet //mesh.setWorldPosition(p); //mesh.setWorldDirection(direction, up); } }
  2. Hi Unigine Team, First : I must to say you , Thank you so much for public release unigine game engine , I used a bit unigine , this engine is amazing & awesome... Second : Big game dev team or small game dev team can make open world game or Big game with C# or C++ in unigine? Which Language With API Complete in Unigine? C# or C++? Three : Is it possible tell me, which games or simulate projects made with unigne website address? Sincerely Ahmad Karami A Teacher/Book author/Test engineer/Solo GameDev
  3. Hi, I've just installed the 2.11 Community SDK and the C# Api button is disabled in the SDK Browser I'm on Arch Linux Mono is installed and configured (used in other projects that need it, like Godot Engine) I've also noticed the following point in the linux documentation https://developer.unigine.com/en/docs/2.10/code/environment/linux?rlang=cpp but there is not "lib" sub-folder in the SDK folders Thanks for your answers
  4. Valve Index

    Hi. Is it possible to create a VR application using the Valve Index with the C# Component System? I'd like to switch our dev team from Unity to Unigine for an upcoming project but documentation says only Oculus Rift, HTC Vive and Vive Pro are supported out-of-the-box. What steps would we need to take to get an Index working? Thanks!
  5. Creating C# application in Linux

    Hi, I'm trying to get started with this guide to create a C# application: https://developer.unigine.com/en/docs/2.2.1/code/csharp/application I have installed Mono the way that is recommended in the guide, and it works. But when I try to create a new project in UNIGINE SDK Browser, I can only choose between the APIs C++ (GNU Make), C++ (QMake) and UnigineScript only. What do I miss or do wrong? Thanks!
  6. Recently I tried to integrate Unigine 2.2.1-2 to WPF app. I hosted Winforms control (based on D3D11 embedding sample) to WPF window. While playing I found shadows too contrast in WPF app but not in winforms one Any ideas?
  7. orthoBasis and orthoNormal in C#

    How do I access orthoNormal and orthoBasis in C#? I assume there's a static class somewhere, but I can't find it, nor can I find corresponding c# documentation for the c++ documentation on those functions. Thanks
  8. Hi, I am a bit unclear about how to access custom plugins in a C# project. When I was using UnigineScript I brought in my network code as a custom C++ plugin derived from Unigine::Plugin, exported as dll and loaded through extern_plugin. Can you explain the flow now that I'm rewriting the project in C#? Can I use the same dll? Unigine document shows the Plugin class as written alongside the C# main() and being called directly from the code. So a dll is not needed? I'm hoping for a quick reply, thanks.
  9. I encountered a strange problem that I started the Csharp app demo in sdks\sim_eval_win_2.0-RC2\source\csharp\samples\App\D3D11SharpAppForm and ran a sample, When I called the console and inputed editor_load, the app was crashed in x64 platform and also had something wrong in x86 like the following screenshort figure in attach files. I do not know how to solve this problem. log.html
  10. Secondary Scripting Languages

    Just wondering if there's a remote possibility of plans for Unigine supporting other scripting languages. Say native C#, Python, LUA... anything?
×
×
  • Create New...