Jump to content

Search the Community

Showing results for tags 'setcolor'.

  • 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...

Found 2 results

  1. Hi, everyone! I can not set a color of my WidgetVBox object so that when I do it, rung object doesn't get the color. class Rung : Unigine::Widgets::Canvas ... class Workspace : Unigine::Widgets::Widget { Rung rung; Unigine::Widgets::VBox box; Workspace() { box = new Unigine::Widgets::VBox(); widget = box.widget; // Добавляем rung в workspace rung = new Rung(); widget.addChild(rung.widget, GUI_ALIGN_TOP | GUI_ALIGN_LEFT); this.setHeight(600); this.setWidth(800); box.setBackground(1); box.setColor(vec4(0, 0.98, 0.98, 1)); } ~Workspace() { } };
  2. Material cloning for decals

    Hi guys, I am new to unigine and this forum, sorry if I am duplicating topic. I am working on selection decals ( selection ring around unit(s)/structure while they are selected ). What I want is to create lots of decals from one base material with different ( random ) colors using "color_scale" parameter to distinguish each of them. I mean unit selection ring according to player color. This is what I did till now but it's not working : strMaterial is base material. string strMaterialWithColor = format("%s, %.2f, %0.2f, %0.2f, %0.2f", strMaterial, vColorModifier.x, vColorModifier.y, vColorModifier.z, vColorModifier.w); int idLibrary = engine.materials.findLibrary("world1.mat"); if(idLibrary == 0) { idLibrary = engine.materials.addWorldLibrary("world1.mat"); } if(idLibrary == 0) { strMaterialWithColor = strMaterial; } if(idLibrary != 0 && engine.materials.findLibraryMaterial(idLibrary, strMaterialWithColor) == -1) { int idMaterial = engine.materials.cloneMaterial(strMaterial, "world1.mat", strMaterialWithColor); Material mat = engine.materials.getMaterial("world1.mat", idMaterial); mat.setParameter("color_scale", vColorModifier); } else { strMaterialWithColor = strMaterial; } DecalOrtho decal = new DecalOrtho(vPos.z + DECAL_PROJECTOR_OFFSET, 2, 2, strMaterialWithColor ); Please help me.
×
×
  • Create New...