Search the Community

Showing results for tags 'uniginescript'.



More search options

  • 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
    • IG (Image Generator)
    • VR Discussions
    • General
  • Improving UNIGINE
    • Documentation
    • Feeback for UNIGINE team
    • Bug Reports
  • Community
    • Collaboration
    • Showcase
    • General Discussions
  • Legacy
    • UnigineScript

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Found 17 results

  1. Здравствуйте! Есть один общий трэк, который содержит в себе несколько мелких. Пытаюсь программно поменять расположение запуска одного из трэков. Не очень понятно как это сделать. Если правильно понимаю, то для этого нужно задать indicies_t и keys_t и сделать update_track_float. Код примерно такой: Unigine::Tracker::TrackerParameterTrack::Track t = track.parameter_tracks[num]; t.indices_t[0] = 7.0f; t.indices_t[1] = 17.0f; Unigine::Tracker::TrackerParameter tp = track.getParameter(num); tp.update_track_float(t.keys_t, t.indices_t); Объясните, пожалуйста, также, что такое indicies_t, и какое отношение этот массив имеет к keys_t? Comp.track
  2. Return list of string as parameter

    Hello I'm trying to call a function and return a list of element, but the list always return with the element were each element is null. Here is a sample with a list of string, I try many variant but don't work any. void btTest() { string test[]; teststr(test); log.message("\n"); foreach(string st; test) { log.message(format("-> %s", st)); } } void teststr(string &strs[]) { for (int i=0;i<20;i++) { string s = format(" %d,", i); strs.append(s); log.message(s); } } 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, -> -> -> -> -> -> -> -> -> -> -> -> -> -> -> -> -> -> -> -> Any idea how I can return a array of elements from a function using Uniginescript
  3. Random crashes

    Hi @demostenes, I've reproduced this. However, it wasn't that often as you mentioned, but quite stable. I also observed that you're running main_sdl.exe instead of regular main.exe. Is this on purpose? We'll investigate the reasons for the crash and will try to fix it in the next update. Thanks.
  4. Hi, I just observed that SplinePoint class is not available in UnigineScript for 2.7.3 SDK. I didn't check SplineSegment class so please check it too. Variable::setExternClassObject(): can't find class SplinePoint * __ptr64 extern class Disassemble: 0x0000049e: callecfr WorldSplineGraph.createSplinePoint or maybe should I add an additional include ? Cheers, Jan
  5. Hi, While Editor is running and application logic is on, I would like to handle input from keyboard. Currently I am using a "Usage Example\Basic Object Movements" example from documentation int init() { engine.visualizer.setEnabled(1); Player player = new PlayerSpectator(); player.setPosition(Vec3(0.0f,-3.401f,1.5f)); player.setDirection(Vec3(0.0f,1.0f,-0.4f)); engine.game.setPlayer(player); int index = engine.editor.findNode("Player"); if (index != -1) { sphere = engine.editor.getNode(index); } engine.controls.setStateKey(CONTROLS_STATE_AUX_0, 'p'); return 1; } // start of the main loop int update() { if (sphere != NULL) { float ifps = engine.game.getIFps(); float angle = ifps * 90.0f; // get the current world transform matrix of the mesh Mat4 worldTransform = sphere.getWorldTransform(); // get the direction vector Vec3 direction = Vec3(worldTransform.col1); engine.visualizer.renderDirection(sphere.getWorldPosition(), vec3(direction), vec4(1.0f, 0.0f, 0.0f, 1.0f), 0.1f, 0); if (engine.controls.getState(CONTROLS_STATE_AUX_0)) { Vec3 delta_movement = direction * movement_speed * ifps; sphere.setWorldPosition(sphere.getWorldPosition() + delta_movement); } mat4 transform = sphere.getTransform() * rotateZ(angle); sphere.setTransform(transform); } return 1; } but input is ignored when I am running a project in Editor. If I run the project from the DSK browser it works as expected. How can I handle the same input while the editor is executing application logic. Otherwise I have to keep running the project which is not the best experience while developing? Thanks, Andrew
  6. Missed functions in documentation

    Hi, Some functions can't be found in documentation, here are some of them: is_file is_dir is_hidden absname relname currdir basename (listed in C++ String class but not in UngineScript) dirname (listed in C++ String class but not in UngineScript) pathname (listed in C++ String class but not in UngineScript) ... Some are listed in Unigine 1.0 documentation, but for some reason not in most recent versions. Thanks in advance.
  7. [SOLVED] Extending the Editor Panel

    The plugin sample explains pretty clearly how to add new UIs via the plugin tab in the Tools menu, but is there a way I can launch my plugin from the editor toolbar panel without modifying the source code?
  8. Are there any examples of how to return a Unigine::vector<Type> back to UnigineScript? It doesn't appear to work in the way that I would expect. C++ ---MyClass.cpp Unigine::Vector<CustomStruct> &getStruct() { return my_struct; } ---Plugin.cpp ExternClass<MyClass> *my_class= MakeExternClass<MyClass>(); my_class->addConstructor(); my_class->addFunction("getStruct",&MyClass::getStruct); Interpreter::addExternClass("MyClass",my_class); UnigineScript MyClass my_class = new MyClass(); CustomStruct structs[] = my_class.getStruct(); Error: Interpreter::parse_expression_array(): "my_class" is not a user array
  9. Disabling Editor Cache

    Both a coworker and myself observed that after some time of debugging, our editor specific UnigineScripts would not recomplile or 'refresh' in the engine. We determined it was due to the respective editor_cache and world_cache files. Deleting these solves our immediate problem but can we disable these so that we can more effectively debug our editor scripts?
  10. C++ API samples

    Hello, I'm working with the evaluation kit, and I've noticed that many of the C++ API samples (Lights, objects, players, etc.) use UnigineScript files to fill the scene in (with lights or objects). I've been trying to combine a few samples and get them to work on my own without the UnigineScripts, by creating the player, objects, and lights in C++ only, but so far I haven't gotten anything to appear on the screen. Are there some capabilities within UnigineScript that aren't possible with the C++ API? Or should I be able to get things working using C++ only? Thanks!
  11. Hi if(timeAtStartGobal == eventID_value) { } Check if strings are the same does not work, why? Comes from XML: eventID_value = item.getArg("value"); Comes from date: timeAtStartGobal = date("%2h:%02m");
  12. We are looking for a Unigine developer with at least 2 years experience programming in Unigine Script and C++ needs to based in UK!
  13. [SOLVED] Maps, append vs []

    Hello! I am new to Unigine and I am currently going through the UnigineScript documentation. Something that struck me is that I can not see a big difference between appending to a map and just setting a value. The documentation seems to recommend using append when inserting new values, so I am wondering if they are different in some way, maybe something regrading performance? Or perhaps it is just standard convention. What I mean is what is the difference between doing: int mymap[]; mymap["foo"] = "bar"; and: int mymap[]; mymap.append("foo", "bar"); The first one seems to me like it's more concise than the second one. The behaviour does not seem to differ really, because when a key already exists, append overwrites the value, so therefor it should (?) work the exact same way as []. Cheers!
  14. [SOLVED] Run a batch file

    Is there any way to run a .bat file using unigine script? I have an OpenGl simulator and now want to start that using unigine button. Also how to check the status of cmd(written in .bat) i.e whether it is executed or not. Thanks in advance.
  15. It would be nice to have some sort of hook in the editor plugins that detects when a new world is loaded... is this currently possible?
  16. I have a DummyNode with a child ObjectMesh, both created via System-script function NewNode(), and the pointers are managed by C++. Child was attached by Unigine::Node::addChild(). I used SetScale() from World script to set parent node scale - all was Ok. BUT. When I moved SetScale() to the System script, it began to set the scale BOTH to parent and child nodes. (C++) - by switching which line, I get different sizes of objects on the scene (of size Scale or Scale^2) ... static void SetScale(NodePtr parentNode, float scale) { //Engine::get()->runSystem("NodeSetScale", Variable("Node",node.get()), Variable(scale)); Engine::get()->runWorld("NodeSetScale", Variable("Node",node.get()), Variable(scale)); } (unigine.cpp) - indeed sets Node's and Node's child scale ... void NodeSetScale(Node node, float scale) { return node.setScale(vec3(scale, scale, scale)); } (Earth.cpp) - indeed sets Node's scale only ... void NodeSetScale(Node node, float scale) { return node.setScale(vec3(scale, scale, scale)); }
  17. Is there a base scratch code for FPS type game? I remember Unigine started adding some stuff for various scratch code bases, but I can't check since my support got cut off. Thank you.