Creating dotnet new templates with samples

In this post I will show the needed steps and samples to create dotnet new templates. Introduction Recently a friend asked me about the steps I follow to create dotnet new templates, while I was describing the steps to him I realized that information could be usefull to someone else...
Read more

unitytips: String interpolation

Since C# 6.0 you can use String interpolation to make code more readable: The sample lines will result in the same string The $ special character identifies a string literal as an interpolated string. String interpolation provides a more readable and convenient syntax to create formatted strings than a string...
Read more

unitytips: Expression body definition

When you have a single line method, you can use expression body definition do simplify and reduce the lines of code: Expression body definitions for methods and read-only properties are supported starting with C# 6. Expression body definitions for constructors, finalizers, property accessors, and indexers are supported starting with C#...
Read more

Dapper and the NVARCHAR(4000) arguments

Performing a profiler in the queries sended to the database you can see that in some cases Dapper is sending the string arguments as NVARCHAR (4000). This happen because Dapper cannot infer what is the exactly type and length of the table column on database. The downside of the NVARCHAR...
Read more

Can I send batch messages larger than 256 KB to Azure Service Bus?

The short answer NO! The long answer The Azure Service Bus maximum message size is 256 KB for Standard tier and 1 MB for Premium tier (https://docs.microsoft.com/azure/service-bus-messaging/service-bus-quotas). A simple solution to overcome this limitation is split the messages in blocks lower or equal to 256 KB size. Below is a...
Read more

Deploying a T4 Template with dotnet pack

In this post I will show how to deploy a T4 Template to a target project using a NuGet package built with dotnet CLI pack command. Introduction Recently I had to distribute a T4 template inside a NuGet package, so developers who installed the NuGet package would get, in addition...
Read more

Unity and Game Development links (Aug 5th 2019)

Phi Dinh remembered a Twitter moment with tips and tutorials about the shaders used on Recompile. (Recompile Unity Tips and Tutorials). Thomas Krogh-Jacobsen wrote a blog post about Unity 2019.2 release. This version has more than 170 new features. (Here’s what’s in the brand-new Unity 2019.2). Screen.cutouts for iOS/Android, Burst...
Read more

Developing Web APIs - Good Practices

Some days ago a coworker asked me what I thought about wich status code a web api should return and if there are some good pratices to follow. When he asked this, I remembered that I’ve followed some good pratices, most of them based on my emperical knowledge of years...
Read more

Unity Toasty Notification

Last saturday I created the ToastyNotification package, a fun editor log interceptor that play Mortal Kombat’s Toasty easter-egg every time an error is logged. Setup Just install the ToastyNotification.package from the repository release page. Now every time your game raise an error on Unity’s editor console log, the Toasty Notifcation...
Read more

Unity and Game Development links (July 29th 2019)

Kristin Stock published an amazing video about SPH (Smoothed Particle Hydrodynamics) in Unity. (Fluid Simulation / Smoothed Particle Hydrodynamics in Unity). SIGGRAPH 2019 is taking place in Los Angeles, between July 28 and August 1. Unity has made a page where you can see the Unity’s presentations calendar (Unity at...
Read more

Publishing a .NET Core project to SonarCloud with Cake

In this post I will show how to use Cake to build and test a .NET Core project and then publish the results to SonarCloud. Introduction Cake (C# Make) is a cross-platform build automation system with a C# DSL for tasks such as compiling code, copying files and folders, running...
Read more

unitytips: Scene Preview Window

I created this window that extends the Unity 3D editor so you can preview the scenes by selecting them in the project window. Usage As can be seen from the video above the extension can be used in two ways after adding the Scene Preview window to the editor (via...
Read more

Unity and Game Development links (July 22th 2019)

Stephen Palmer presented the preview of Addressables, the Unity new system for editor and runtime asset management. (Addressable Asset System). What we found when talking to developers about their experience using Asset Bundles was that almost everyone doing so successfully were more or less writing the same high level systems...
Read more

GeneticSharp in the Wild: Design of a Warehouse Order Picking Policy

I started a series of posts about some outstanding scientific papers and projects using GeneticSharp. For this fourth post the choose one is the Design of a Warehouse Order Picking Policy - Using Genetic Algorithm. Introduction The main motivation of the author about this paper was: improving order-picking process is...
Read more

unitytips: Hierarchy Window GameObject Icon

You can show the game objects icons in hierarchy window using EditorGUIUtility.ObjectContent Code 400: Invalid request You can easily import this gist directly into your Unity 3D project using the Gist Importer The icons used in the video are Font Awesome icons and I used fa2png.io to convert them to...
Read more

Unity and Game Development links (July 15th 2019)

Alexander Ameye made a tutorial about edge detection shaders with Shader Graph and how to use some Lightweight Rendering Pipeline customization to generate DepthNormals (Edge Detection Shader). Cyan made a blog post about Render Textures and how to read them in a C# script (Render Textures). Render Textures are stored...
Read more

GeneticSharp 2.6.0 - Blazor template

The GeneticSharp 2.6.0 is out. Blazor template Now we have 4 dotnet new templates, besides the GeneticSharpConsoleApp, GeneticSharpTspConsoleApp and GeneticSharpTspUnity3d already existent, a new template for a Blazor client app was added: GeneticSharpTspBlazorApp: dotnet new -i GeneticSharp.Templates dotnet new GeneticSharpTspBlazorApp -o TspBlazorApp cd TspBlazorApp dotnet run If you want to...
Read more

TSP with GeneticSharp and Blazor

In this post I will show how to use GeneticSharp and Blazor to solve the TSP (Travelling salesman problem). Introduction According to Wikipedia The travelling salesman problem (TSP) asks the following question:“Given a list of cities and the distances between each pair of cities, what is the shortest possible route...
Read more

unitytips: Hierarchy Window Layer Info

You can create a visual layer info to any component on your hierarchy window using EditorApplication.hierarchyWindowItemOnGUI: Code 400: Invalid request You can easily import this gist directly into your Unity 3D project using the Gist Importer
Read more

Unity and Game Development links (July 8th 2019)

Sykoo released a YouTube video about the new Unity Terrain Tools package (Build Beautiful Terrains with Unity 2019! – New Terrain Tools Package). Stacey Haffner made a blog post about the new experience for Collaborate that they are designing, like new UI and Git command-line support (Collaborate Developer Diary #1:...
Read more

GeneticSharp in the Wild: Frixel

I started a series of posts about some outstanding scientific papers and projects using GeneticSharp. For this third post the choose one is the Frixel: 2D framing / pixel structural optimization. Introduction Frixel is a plugin for Rhinoceros 6, a 3D computer graphics and computer-aided design (CAD) application. A finite...
Read more

unitytips Museum

I recently started studying Blazor and last weekend I created this simple app that I called: #unitytips Museum, a collection of best #unitytips. You can access it directly in my site, in this url: http://diegogiacomelli.com.br/apps/unitytips-museum The #unitytips collection Every week all #unitytips retweeted by @unity3d will be included to the...
Read more

Unity and Game Development links (July 1st 2019)

Unity released a YouTube tutorial about how to create a portal effect in Lightweight Render Pipeline with Shader Graph (Making Portals with Shader Graph in Unity! (Tutorial)). Dilmer Valecillos posted a video on augmented reality while implementing a dragging feature with ray-casting (AR Foundation with Unity3d and Adding Dragging Functionality...
Read more

Starting an Unity3D project with GeneticSharp using dotnet new

In this post I will show how to use dotnet new command to start an Unity3D project with GeneticSharp. Introduction Sometime ago I created a NuGet package called GeneticSharp.Templates, this package allows developers to install GeneticSharp templates using the dotnet new command. Among the availables templates in GeneticSharp.Templates, there is...
Read more

unitytips: Gist Importer

Using the Gist below you can easily import other Gists to your Unity project just copying the URL from browser: Code 400: Invalid request All Gists are imported to folder Assets/Gists
Read more

Unity and Game Development links (June 24th 2019)

Sykoo made a video about the Buried Memories Volume 2: Serekh (Buried Memories: Serekh – New HDRP Asset Pack for Unity! (Overview)). Jean-Christophe Cimetiere wrote a post about how to use Unity as a library inside other apps (Add features powered by Unity to native mobile apps). Unity 2019.3 will...
Read more

GeneticSharp in the Wild: Context-Sensitive Code Completion

I decided to start a series of posts about some outstanding scientific papers and projects using GeneticSharp. For this second post the choose one is the Context-Sensitive Code Completion: Improving Predictions with Genetic Algorithms. Introduction The main motivation of the author about this paper was: Current methods of training code...
Read more

unitytips: Changing the style of the Hierarchy Window Group Header

In my last #unitytips I demonstrated how you could create a visual header to any group of components on your hierarchy window using EditorApplication.hierarchyWindowItemOnGUI. Now I’m improving it allowing you to customize its style. To change the style, you just need to edit the values of the HierarchyWindowGroupHeaderSettings in the...
Read more

unitytips: Hierarchy Window Group Header

You can create a visual header to any group of components on your hierarchy window using EditorApplication.hierarchyWindowItemOnGUI: Code 400: Invalid request You can easily import this gist directly into your Unity 3D project using the Gist Importer Any GameObject with name that starts with “—” will be considered a group...
Read more

Unity and Game Development links (June 17th 2019)

Sebastian Lague made an ecosystem simulation with foxes and rabbits in Unity3d (Coding Adventure: Simulating an Ecosystem). Marius Horga wrote an overview about Metal 3 (Introducing Metal 3). Metal 3 was announced last week at WWDC 2019. Apple presented it along with relevant numbers: Metal can now make 100 times...
Read more

Using Tesseract 4 with C#

Recently I built a small tool to read the text of thousands of images. A common technique to extract text from images is know as OCR (Optical character recognition) and the best implementation, that I Know, is called Tesseract. When a I started to build the tool, I used the...
Read more

unitytips: MenuItem "CONTEXT/component"

You can create a context menu for any component using the "CONTEXT/<component>/<menu name>" on a MenuItem attribute: Code 400: Invalid request You can easily import this gist directly into your Unity 3D project using the Gist Importer
Read more

Unity and Game Development links (June 10th 2019)

Toulouse de Margerie wrote a post about how Unity natively maintains frame rates an how to make Unity follow a precise frame rate (Precise frame rates in Unity). Normally, out of the box, a Unity project will attempt to run your project as fast as possible. Frames will be rendered...
Read more

Evolution (or from prototype to game)

The importance of game prototype Several famous books and game designers cite how the prototyping phase of a new game project is an important time to lay out the foundations that will guide the whole game structure during its development project and, as well, to experiment with concepts and ideas...
Read more

Using a Sprite Mask to create a flashlight effect

When I was reading about the Sprite Mask on Unity Manual, I questioned my self "How long does it take to create a flashlight effect using the Sprite Mask?". The answer is: less than 2 minutes. You can check this by watching the video tutorial that I made showing how...
Read more

Unity and Game Development links (June 3th 2019)

Nick Davis wrote a post about how Unity recently teamed up with Autodesk and Texel Logic to create a mixed-reality experience to illustrate and understand the complex nature of airflow passing over and around an IndyCar (Simulating high-speed IndyCars in AR). Sykoo, online evangelist for Unity, published a video showing...
Read more

Coding an EditorWindow to create default animations from sprites

In this tutorial, we will learn how to coding an EditorWindow that creates Animation Clips and Animator Override Controller from Sprites. Introduction Create animation clips from sprites is quite a simple operation to perform on Unity: Your browser does not support the video tag. But in many cases, you need...
Read more

Publishing WebJobs with Azure Pipelines

Azure WebJobs are a great way to execute background process. Scenario In last days I’ve created a Azure Pipelines that publish WebJobs, but in our specific case our WebJobs were not being published to /site/wwwroot/App_Data/jobs/Continuous/<webjobs name>, because “reasons” our root web app is using ‘/site/www’ as folder. So, you should...
Read more

A Sorting Layer Debugger for Unity

While I was reading about 2D Sorting and Sorting Layers on Unity Manual I came up with the idea of creating a custom editor window to see which sorting layer the sprites on the scene are using. In the video above you can see the Sorting Layer Debugger been used...
Read more

Unity and Game Development links (May 24th 2019)

Kristin Stock posted a video about how she is procedurally generating cities using Subdivsion in Unity. Dave Hunt and Yang-Hai Eakes made an introduction for the Animation Rigging preview package for Unity 2019.1. Set up procedural motion on animated skeletons at runtime. You can use a set of predefined animation...
Read more

Unity Avatar Mask and Animation Layers

In this tutorial we will learn how to use Avatar Mask and Animation Layers to combine multiple animations. Introduction Imagine we imported an animated 3D model from Asset Store, in our sample, we will use the incredible robot from the free package Sci Fi Warrior PBR HP by Dungeon Mason....
Read more

dotnet new templates for GeneticSharp

Now GeneticSharp has a NuGet package called GeneticSharp.Templates, this package allows you to install GeneticSharp templates using the dotnet new command. Installing the GeneticSharp.Templates Before you can use the dotnet new command to create the GeneticSharp projects from templates, you need to install it on your machine: dotnet new -i...
Read more

GeneticSharp v2.4.0 - New crossovers and TPL implementations

The GeneticSharp v2.4.0 is out. The additions of this version are the two new crossovers implementations and a new option of ITaskExecutor that use TPL. Crossovers Alternating-position (AP) The alternating position crossover operator (Larrañaga et al. 1996a) simply creates an offspring by selecting alternately the next element of the first...
Read more

jogosdaqui - um pouco de história, open source e colaboração (pt-BR)

Muitos não sabem, mas além de programar, sempre gostei de ajudar a divulgar a indústria brasileira de desenvolvimento de jogos. Criação do jogosdaqui Em 2005, junto com mais 3 amigos, foi fundado o site jogosdaqui, que era um site especializado em falar sobre os games desenvolvidos por empresas brasileiras. Esse...
Read more

GeneticSharp v2.2.0 - Sudoku sample

The GeneticSharp v2.2.0 is out. The additions of this version are the new whole sample and extensions showing how to use GeneticSharp to solve a Sudoku. The GeneticSharp.Extensions project receive those new features: Multiple MultipleChromosome Compound chromosome to artificially increase genetics diversity by evolving a list of chromosomes instead of...
Read more

GeneticSharp v2.1.0

The GeneticSharp v2.1.0 is out. Features Add constructor with values to FloatingPointChromosome #33 As it is now whenever you create an instance of FloatingPointChromosome, it will randomly create gene values. I have a case where I need to stop optimization at some time, save results to DB and resume it...
Read more

GeneticSharp Unity3d Samples released on Google Play

I published on Google Play the GeneticSharp Unity3d Samples. In this app you can see GeneticSharp running on Unity3d in three different samples: Car2D Based on famous BoxCar2D, this sample uses a genetic algorithm to create car designs to overcome road challenges, like gaps, hills, and obstacles. TSP The classic...
Read more
Follow @giacomelli
Tutorials

News

Articles

Labs