This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shader "Custom/AnimatedUVScale" | |
{ | |
Properties | |
{ | |
_MainTex("Texture", 2D) = "white" {} | |
_Scale("Scale", Vector) = (1, 1, 1, 0) | |
} | |
SubShader | |
{ | |
Tags { "RenderType"="Opaque" } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEngine.UI; | |
[RequireComponent(typeof(CanvasRenderer))] | |
public class RoundedRect : Graphic | |
{ | |
[SerializeField] private float m_CornerRadius = 10f; | |
[SerializeField] private float m_BorderWidth = 1f; | |
[SerializeField] private Color m_BorderColor = Color.black; | |
[SerializeField] private int m_CornerSegments = 20; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
import matplotlib.pyplot as plt | |
def plot_scaled_graph_with_values(frame_0, frame_7, data): | |
""" | |
Plots the graph with the given data, scaling the values at frame 0 and frame 7, | |
and prints the scaled values per frame. | |
Parameters: | |
- frame_0: tuple (x0, y0, z0) values at frame 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEngine.UI; | |
#if UNITY_EDITOR | |
using UnityEditor; | |
// Custom Editor to order the variables in the Inspector similar to Image component | |
[CustomEditor(typeof(UICircleRenderer)), CanEditMultipleObjects] | |
public class CircleGraphicEditor : Editor | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Put this file OUTSIDE Editor folder | |
using UnityEngine; | |
public class ReadOnlyAttribute : PropertyAttribute { } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using GooglePlayGames; | |
using GooglePlayGames.BasicApi; | |
using GooglePlayGames.BasicApi.SavedGame; | |
using UnityEngine; | |
public class GooglePlayUserDataManager : MonoBehaviour | |
{ | |
[SerializeField] public UITest theUI; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEditor; | |
using UnityEngine; | |
using System.Collections.Generic; | |
#region Color Enum | |
enum AppColor | |
{ | |
Custom, | |
White, | |
Red, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bpy | |
# Name of the main collection | |
main_collection_name = "MainCollection" | |
new_collection_name = "NewCollection" | |
# Get the main collection by name | |
main_collection = bpy.data.collections.get(main_collection_name) | |
if main_collection: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:async'; | |
import 'package:rxdart/rxdart.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/widgets.dart'; | |
import 'dart:html' as html; | |
class WindowResizeListener extends StatefulWidget { | |
final Widget child; | |
const WindowResizeListener({super.key, required this.child}); | |
@override |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections.Generic; | |
public class ColorCombination : MonoBehaviour | |
{ | |
public Material newMaterial; | |
private void OnCollisionEnter(Collision collision) | |
{ | |
Renderer renderer = collision.gameObject.GetComponent<Renderer>(); |
NewerOlder