how to clear console through script unity
C#
using System.Reflection; //make sure you add this!
using UnityEngine;
void Update()
{
if (Input.GetKey("space"))
{
ClearLog() //when you call this function it will clear the console
}
}
public void ClearLog() //you can copy/paste this code to the bottom of your script
{
var assembly = Assembly.GetAssembly(typeof(UnityEditor.Editor));
var type = assembly.GetType("UnityEditor.LogEntries");
var method = type.GetMethod("Clear");
method.Invoke(new object(), null);
}
Also in C#:
- Title
- c# dapper execute stored procedure with parameters
- Category
- C#
- Title
- displayname c#
- Category
- C#
- Title
- xamarin forms alarm
- Category
- C#
- Title
- linq in c#
- Category
- C#
- Title
- unity monobehaviour
- Category
- C#
- Title
- override Microsoft.AspNetCore.Authorization.AuthorizeAttribute
- Category
- C#
- Title
- c# combobox datasource enum
- Category
- C#
- Title
- c# get all inherited classes of a class
- Category
- C#
- Title
- c# convert dictionary to anonymous object
- Category
- C#
- Title
- convert generic to type c#
- Category
- C#
- Title
- never lose focus textbox c#
- Category
- C#
- Title
- unity how to rotate something to point to something else
- Category
- C#
- Title
- winforms timer c#
- Category
- C#
- Title
- IEnumerator
- Category
- C#
- Title
- c# console delay
- Category
- C#
- Title
- c# getter setter
- Category
- C#
- Title
- disable a component unity
- Category
- C#
- Title
- microsoft input tool need .net framework
- Category
- C#
- Title
- c# md5 string
- Category
- C#
- Title
- datatable return column names
- Category
- C#
- Title
- switch case c# range
- Category
- C#
- Title
- see if two string arrays are equal c#
- Category
- C#
- Title
- codecademy
- Category
- C#
- Title
- cannot convert string to generic type c#
- Category
- C#
- Title
- remove items from list c# condition
- Category
- C#
- Title
- c# for loop without increment
- Category
- C#
- Title
- c# data types
- Category
- C#
- Title
- c# udpclient receive buffer size
- Category
- C#
- Title
- c# get desktop path
- Category
- C#
- Title
- C# linq mselect
- Category
- C#
- Title
- c# dictionary add
- Category
- C#
- Title
- how to sort string array alphabetically in c#
- Category
- C#
- Title
- get permission to write read file and directory on file system C#
- Category
- C#
- Title
- open link c#
- Category
- C#
- Title
- query associative table ef6
- Category
- C#
- Title
- c# reflection create generic type
- Category
- C#
- Title
- how to clear console in c#
- Category
- C#
- Title
- mongodb c# batch find
- Category
- C#
- Title
- c# get the last item in a list
- Category
- C#
- Title
- sending data photon c#
- Category
- C#
- Title
- binding c#
- Category
- C#
- Title
- phone
- Category
- C#
- Title
- wpf restart application c#
- Category
- C#
- Title
- c# change colour of console
- Category
- C#
- Title
- uncaught syntaxerror invalid or unexpected token unity webgl
- Category
- C#
- Title
- load information with txt file to uwp c#
- Category
- C#
- Title
- c# LCP
- Category
- C#
- Title
- can send but cannot receive email dreamhost email
- Category
- C#
- Title
- how to detected WindowCloseEvent in other window wpf
- Category
- C#
- Title
- whats a string
- Category
- C#
- Title
- Request.ServerVariables["HTTP_X_FORWARDED_FOR"] get only one ipaddress
- Category
- C#
- Title
- unity rigidbody constraints
- Category
- C#
- Title
- nunit return parameter
- Category
- C#
- Title
- divide string in chunks c#
- Category
- C#
- Title
- how to convert iformfile to byte array c#
- Category
- C#
- Title
- for each property in object c#
- Category
- C#
- Title
- unity input get axis
- Category
- C#
- Title
- unity rotate around point
- Category
- C#
- Title
- how to parse a string to an integer c#
- Category
- C#
- Title
- C# previous method
- Category
- C#
- Title
- c# store generic type without arguments
- Category
- C#
- Title
- c sharp tryparse
- Category
- C#
- Title
- button color uwp c#
- Category
- C#
- Title
- rotate player unity
- Category
- C#
- Title
- C# sprint key
- Category
- C#
- Title
- convert base64 string to string c#
- Category
- C#
- Title
- assign datasource to dropdownlist in c#
- Category
- C#
- Title
- unity cast float to int
- Category
- C#
- Title
- c# md5 hash file
- Category
- C#
- Title
- radians to degree c#
- Category
- C#
- Title
- c# loop through repeater items
- Category
- C#
- Title
- mailkit send attachment
- Category
- C#
- Title
- unity create a child object
- Category
- C#
- Title
- .net core check if linux
- Category
- C#
- Title
- copy a list in c# unity
- Category
- C#
- Title
- c# loop datatable rows
- Category
- C#
- Title
- c# expression func automatically select return type
- Category
- C#
- Title
- wpf c# select folder path
- Category
- C#
- Title
- how to create a variable in C#
- Category
- C#
- Title
- multidimensional meaning
- Category
- C#
- Title
- get web config key value in c# razor view
- Category
- C#
- Title
- c# generic abstract method
- Category
- C#
- Title
- how to name GameObject in c#
- Category
- C#
- Title
- unity list length
- Category
- C#
- Title
- c# dictionaries
- Category
- C#
- Title
- nullreferenceexception c#
- Category
- C#
- Title
- class selector to property in asp net core dropdown
- Category
- C#
- Title
- parsing object from text file c#
- Category
- C#
- Title
- c# find element in list of list
- Category
- C#
- Title
- how to stop a form c#
- Category
- C#
- Title
- c# clone stream
- Category
- C#
- Title
- Exception thrown: 'System.FormatException' in mscorlib.dll dates
- Category
- C#
- Title
- how to raycast unit
- Category
- C#
- Title
- c# get enum in list
- Category
- C#
- Title
- c# replace foreach with lambda
- Category
- C#
- Title
- c# linq select from object list
- Category
- C#
- Title
- convert string to double c#
- Category
- C#
- Title
- defualtsize UWP c#
- Category
- C#
- Title
- c# create array of int
- Category
- C#
- Title
- C# move form without border
- Category
- C#