Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
GabLeRoux authored Oct 27, 2024
2 parents c8c57a9 + 7ffdb89 commit edef4fa
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 15 deletions.
2 changes: 1 addition & 1 deletion docs/03-github/01-getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ _**Note:** all steps will be explained in the next chapters._
### First time using GitHub Actions?

Read the official documentation on how to setup a
[workflow](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/configuring-a-workflow).
[workflow](https://docs.github.com/en/actions/writing-workflows/quickstart).

Any subsequent steps assume you have read the above.

Expand Down
24 changes: 24 additions & 0 deletions docs/03-github/04-builder.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,30 @@ that directory. This action must be done before running the game-ci/unity-builde
echo "token = \"${{ secrets.NPM_TOKEN }}\"" >> .upmconfig.toml
```

## Using preprocessor macros

If needed, Unity preprocessor directives can be set by adding a step to the build.

```yaml
steps:
- name: Apply csc.rsp (pre-processor symbols)
run: echo -define:MY_SYMBOL >> Assets/csc.rsp
```

To avoid warnings about "unapplied changes", add `Assets/csc.rsp` in your `.gitignore`

Once set, you can then reference these preprocessor directives in code:

```c
void Start() {
#if MY_SYMBOL
GetComponent<TMP_Text>().text = "I have a symbol!";
#else
GetComponent<TMP_Text>().text = "I do not have a symbol...";
#endif
}
```

## Complete example

A complete workflow that builds every available platform could look like this:
Expand Down
23 changes: 10 additions & 13 deletions src/components/pages/home/section/sponsors-section.tsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
import Link from '@docusaurus/Link';
import React from 'react';
import FadeIntoView from '@site/src/components/molecules/animations/fade-into-view';
import Section from '@site/src/components/pages/home/section/section';
import CircleCiLogo from '@site/static/assets/images/icons/circleci.svg';
import { getUrlWithUtmParameters } from '@site/src/core/url';

const SponsorsSection = () => {
const circleCiUrl = getUrlWithUtmParameters('https://circleci.com');

return (
<Section title="Sponsors">
// Would be nice if the banner had a dark mode that we could use for `dark:*`
<Section title="Sponsors" className="bg-white dark:bg-white">
<FadeIntoView>
<ul className="mt-12 flex gap-4 list-none p-0">
<li>
<Link to={circleCiUrl}>
<CircleCiLogo className="w-[120px] fill-brand-text-light dark:fill-brand-text-dark" />
</Link>
</li>
</ul>
<iframe
title="Game CI Sponsors"
height="667"
width="800"
src="https://opencollective.com/game-ci/banner.html"
frameBorder="0"
scrolling="no"
/>
</FadeIntoView>
</Section>
);
Expand Down
2 changes: 1 addition & 1 deletion versioned_docs/version-2/02-getting-started/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Be sure to **ignore any automatically generated files**, by adding the reference
[.gitignore](https://github.com/github/gitignore/blob/master/Unity.gitignore) file to the root of
your project. Please note that you may have to extend this file to ignore the temporary files
created by the runners, as the creation of these temporary files may cause a runners' local branch
to become dirty (more info [here](/docs/troubleshooting/common-issues#branch-is-dirty])):
to become dirty (more info [here](/docs/troubleshooting/common-issues#branch-is-dirty)):

Two common temporary folders that are created by GameCI are `artifacts` and `CodeCoverage`. You can
ignore them by adding the following lines to your `.gitignore`:
Expand Down

0 comments on commit edef4fa

Please sign in to comment.