Jump to content

Search the Community

Showing results for tags 'c#'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • 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
    • Feeback for UNIGINE team
    • Bug Reports
    • Unigine SDK Beta feedback
  • Community
    • Collaboration
    • Tools, Plugins, Materials & Tutorials
    • Showcase
    • General Discussions
  • Legacy
    • UnigineScript

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...

Found 24 results

  1. Hi; I'm investigating replacements for our current 3D rendering system. I'm currently looking at Unigine. I'm seeing videos or tutorials on how to create a new C# project but i can't find anything on how to add it to an existing project. Another question. Our application is a winforms and a WPF control to host the existing 3D Rendering control. How can you incorporate unigine into a WPF control? Shawn
  2. How Can I setup Visual Studio 2019 For Unigine Support? Whenever I try to edit my code in visual studio i dont find any suggestion or anything to help me with,that doesn't show any error ,or any classes, like it's blank, i cant code in any IDE,not visual studio not visual studio code, IDE doesn't catch any classes of unigine what to do?
  3. Hello, im trying to switch between animations when pressing a key but it is not working: the only key that works is D because the 'idle' animation is set on layer 0, but the others are not working also the animation does not restart, it looks like it picks it up from a specific point as if the animation is still playing in the background. i saw the examples of 'AnimationAdditive' and 'SimpleAnimationPlayer' but i want to change from 1 animation to the other, not combine them. can somebody help me with this?
  4. Gui vs GuiObject

    Hi, Using V2.12.0.2 C# Components i am not able to get the same results from GuiObject as from adding object to Gui.Get() What am i doing wrong? Clean test project is attached. PS: What where the 2 folders you needed to debug project? unigine_UI_Test_Project.zip
  5. Basic example UI component

    Hi, I have been working on C# component for UI. Just finished translating the Unigine::Widgets::Window example from Uniginescript to C# in the OpenGameMenu() function. So I thought to share my result and thought. The widget system has some good things to it and I easily see it becoming a great system. - I can’t wait to see wat I’m able to do with the floating UI’s (next step) That being said it needs some TLC. - More C# examples (in the documentation) and some corrections in the docs. - Alignment and overlapping could use a upgrade. - A actual component set or UI designer So here you are able to find my component GameUI.csv0.1 to get started quickly. Features - @ developers comments - It is able to add, remap default key and mouse bindings. - It handles the mouse state. - Able to close the app. - And gives an example of a lot of widgets, resizing, Widget Calllbacks. Known issues. - Not able to add checkbox to menubox PS: I’m a beginner so don’t take everything to seriously. And coding advise is welcome
  6. [SOLVED] new Material();

    Hi how do i create an new material where i'm able to set the albedo color true code? I am able to clone a material (NOT base_mesh) and set its metalness. V2.12.0.1 Material mat = Materials.FindMaterial("Cone_material").Clone("mesh_base_0"); mat.SetParameterFloat("metalness", 1.0f); // mesh.SetMaterialParameterFloat4("Albedo_color_multiplier",vec4.BLACK,0); // mesh.SetMaterialParameterFloat4("diffuse_color",vec4.BLACK,0); // mesh.SetMaterialParameterFloat4("albedo",vec4.RED,0);
  7. Hi, I want to change the IntersectionMask of a Node true c# code. I found how to change the PhysicsIntersectionMask. drop_item.ObjectBody.GetShape(0).PhysicsIntersectionMask = 2; The object i want to manipulate is a Cylinder BodyRigid created in the Editor. Thanks
  8. Hi, when using "public BodyRigid nodename" the editor does not show the property field. ComponentClass supports Node and Unigine.Component and not Physics-Related Classes. Is there code to validate the node type? Or to get direct feedback in the editor if the selected .node is not acceptable? This is my current code, it works and keeps the program from crashing on Init. General help and advise is always welcome. public Node bouncing_node; private BodyRigid bouncing_body; private void Init() { if(bouncing_node) { if(bouncing_node.NumChildren > 0) { var child = bouncing_node.GetChild(0); if(child.ObjectBodyRigid) { bouncing_body = bouncing_node.GetChild(0).ObjectBodyRigid; } } } } private void UpdatePhysics() { if(bounce_triggerd) { bounce_triggerd = false; if (bouncing_body) { bouncing_body.AddForce(vec3.UP * bounce_power); } } }
  9. Hi, When adding a dummy_node under the default first_person_controller the position does not automatically update. To solve this I created a component to attach using Unigine; [Component(PropertyGuid = "cb0e1963a4eeaf66d7667f8d783a9b88e1a90947")] public class set_world_partner : Component { public String partner_name = "first_person_controller"; private Node partner; private void Init() { partner = World.GetNodeByName(partner_name); node.SetWorldParent(partner); } } Am I missing something?
  10. How to switch animation

    Could someone help me? I need to change animation I'm using C #
  11. Hi everyone, How to Access White Color in Settings Window? I searched , you can help me Thank you
  12. MathLib.Lerp Bug

    Hi Unigine Team, I verified MathLib.Lerp , this function have a bad bug. If the distance from the origin to the destination increases, The shooting point to the destination happens with a fast time interval! this is not correct! While this process should be uniform as a third parameter(speed*Game.Ifps). For example : The starting distance to the destination is 10 meters and the particle travels this distance in 2 seconds For example :The starting distance to the destination is 100 meters and the particle travels this distance in 20 seconds I think this function needs to be reviewed , or at least create another function, according to me, so that missiles and rockets can be designed. Thank you
  13. 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); } }
  14. WorldRotate(vec3) scales object

    Steps: -Add the following component to a primitive box -Use space / enter to trigger WorldRotate using System; using System.Collections; using System.Collections.Generic; using Unigine; [Component(PropertyGuid = "24c7af91cfafa3bcc0f32beb363ad04ec4089b55")] public class BugTester : Component { private void Update() { // write here code to be called before updating each render frame if (Input.IsKeyDown(Input.KEY.SPACE) || Input.IsKeyPressed(Input.KEY.RETURN)) { node.WorldRotate(new vec3(0,0,0.1f)); } Log.Message("rotation " + node.GetRotation()); Log.Message("position " + node.Position); Log.Message("scale " + node.Scale); } } With a Z rotation input vector the cube scales down on X and Y axises until the scale and rotation properties turn into NaN. Unigine Community C# (edit, seems to work the same in C++ version too) WorldRotate.mp4
  15. diffrence between C# and C++ on programming ?

    hey everybody , i`m an indie game developer and i been working with unity engine and c# for about 4 years. and i have good understanding of c# and it`s related API. but when i`m migrated to Unigine i find out that it`s support both C# and C++ and apart from they`re differences on syntax or structure or memory and thread management is there any differences on using each one on Unigine? i mean differences on performances does using C++ on unigine makes our game better and faster ? or something else ? any quote will be so appreciated .... thanks
  16. 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
  17. 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
  18. 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!
  19. 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
  20. 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!
  21. 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?
  22. 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.
  23. 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
  24. 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...