Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Kronnect

Pages: [1] 2 3 ... 26
2
Support / Speeding up Terrain Grid System changes (tip)
« on: November 08, 2021, 09:12:50 AM »
Sometimes you need to reassign cells to other territories and color them. Usually you would do something like this:

Code
foreach (Cell cell in tgs.cells) {
tgs.CellSetTerritory(cellIndex, new_territory_index);
tgs.CellSetColor(cell.index, newColor);
}

CellSetTerritory will reassign the cell to the new territory. It needs to refresh the grid but since this operation can be slow, TGS will delay the grid refresh until end of frame so thousands of calls in a loop like this one won't cause a bottleneck.
The problem resides in the next call to CellSetColor. This method will paint the cell in the new color and because a grid regeneration has been requested by the previous CellSetTerritory call, the refresh will take place inmediately so the cell can be colored. This causes a full grid refresh for every cell!

The solution is to separate the territory reassign from the coloring in two loops:


Code
foreach (Cell cell in tgs.cells) {
tgs.CellSetTerritory(cell.index, 1);
}
foreach (Cell cell in tgs.cells) {
tgs.CellSetColor(cell.index, Color.black);
}

This way the grid will be refreshed only once after all cells have been reassigned and the cell coloring can occur which is quite fast.


5
Announcements & Showcase / Extensions & Resources Packs
« on: August 20, 2021, 05:39:38 PM »
The Extensions & Resources Packs board is exclusive to registered customers. If you own a copy of Voxel Play, please sign up and send a pm with your invoice number to get access.

6
Color Studio / Getting complementary colors using scripting
« on: July 28, 2021, 06:14:46 PM »
Sample code:

Code
using UnityEngine;
using ColorStudio;

public class PaletteSample : MonoBehaviour
{
    void Start()
    {
        CSPalette palette = ScriptableObject.CreateInstance<CSPalette>();
        palette.ConfigurePalette(ColorScheme.SplitComplementary, Color.red);
        palette.BuildHueColors();

        for (int k=0;k<palette.colorsCount;k++) {
            Debug.Log(palette.colors[k]);
        }
    }

}

The code above creates a new palette with 3 colors using the Split Complementary scheme (a primary plus 2 complementary colors).
The primary colors is always at index 0 of palette.colors array. And the other 2 key colors (the complementaries) are in index 1 and 2. You will get more or less key colors depending on the chosen scheme.


7
Want to get free assets to boost your Unity game/project development?

Post a screenshot, video and/or comment on twitter about your project and any of our assets. If you don't have any asset from our portfolio yet, don't worry! Specify which asset you would like to use and what use would you make of it.
Add the tag #unity3d and mention us @Kronnect so we can include your tweet in the monthly giveaway.

Rules:
1) Every month a tweet containing #unity3d and @Kronnect will be randomly chosen (next nomination will take place at the end of August).
2) The winner will receive 3 vouchers for any assets from our collection. If the winner already has at least one of our assets, he will receive 5 vouchers of his/her choice!
3) The winner will be announced on our twitter account @Kronnect (follow us!)
4) There are no limits to the number of tweets you can post. The more (and different) tweets, the more likely to be chosen and win up to 5 free assets :)

Keep creating and good luck!

9
Support / MOVED: Zooming Camera
« on: June 01, 2021, 05:40:37 PM »

13
Welcome, Beta Access & Important Info / How to report an issue
« on: April 28, 2021, 08:56:29 AM »
Before posting an issue, please:

- Make sure you're using the latest version of the asset.
- Make sure you've read any setup instructions included with the asset (usually contained in the PDF).

Include this info when posting an issue:

- Unity version (ie. Unity 2019.4)
- Platform where the issue is present (PC/Mac, mobile, WebGL, etc)
- Rendering pipeline (built-in, URP or HDRP)
- If it's VR related, the plugins you're using (Oculus Integration, Steam, OpenVR) and if you're using multi-pass, single-pass, etc.

If the issue is not evident, please consider creating a simple repro and send it to us by email. That'll allow us to reply much faster, probably in the same labour day.
You can send the repro by email to:


Thank you!

15
Support / MOVED: TGS - Multiple Cell Highlight
« on: April 03, 2021, 04:59:11 PM »

Pages: [1] 2 3 ... 26