<commit_before>﻿using UnityEngine;
using UnityEngine.UI;
using System.Collections;
using UnityEngine.SceneManagement;

public class ScreenFader : MonoBehaviour
{
    public Image fadeImage;
    public float fadeTime = 1.5f;
    public bool isRunning = false;

    void Awake()
    {
        fadeImage.rectTransform.localScale = new Vector2(Screen.width, Screen.height);
        fadeImage.enabled = true;
        fadeImage.color = Color.black;
        StartCoroutine(FadeToColor(Color.clear, fadeTime));
    }

    public IEnumerator FadeToColor(Color endColor, float fadeTime, int steps = 60)
    {
        isRunning = true;<commit_msg>Fixed fadeImage initialization when updating Canvas prefab<commit_after>﻿using UnityEngine;
using UnityEngine.UI;
using System.Collections;
using UnityEngine.SceneManagement;

public class ScreenFader : MonoBehaviour
{
    private Image fadeImage;
    public float fadeTime = 1.5f;
    public bool isRunning = false;

    void Awake()
    {
        fadeImage = GameObject.Find("FadeImage").GetComponent<Image>();
        fadeImage.rectTransform.localScale = new Vector2(Screen.width, Screen.height);
        fadeImage.enabled = true;
        fadeImage.color = Color.black;
        StartCoroutine(FadeToColor(Color.clear, fadeTime));
    }

    public IEnumerator FadeToColor(Color endColor, float fadeTime, int steps = 60)
    {
        isRunning = true;
{'fraction_non_alphanumeric': 0.08633093525179857, 'fraction_numerical': 0.007194244604316547, 'mean_word_length': 3.5162337662337664, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6060779', 'n_tokens_mistral': 399, 'n_tokens_neox': 395, 'n_words': 99}